-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: speedup base builds * ci: fix substitution * ci: prebuild cli * chore: testing * ci: fix download paths * ci: fix executables * ci: more debug * ci: fix perms * ci: cleanup and rename
- Loading branch information
Showing
3 changed files
with
101 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: 'Check system' | ||
description: 'checks system status' | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: ⚙️ Check docker service | ||
shell: bash | ||
run: | | ||
systemctl status docker | ||
- name: ⚙️ Check docker info | ||
shell: bash | ||
run: | | ||
docker info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,11 @@ permissions: | |
jobs: | ||
setup: | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 15 | ||
|
||
outputs: | ||
uid: ${{ steps.init.outputs.uid }} | ||
|
||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
|
@@ -31,6 +36,10 @@ jobs: | |
with: | ||
save-cache: true | ||
|
||
- name: ⚙️ Init | ||
id: init | ||
run: echo "uid=$(uuidgen)" >> ${GITHUB_OUTPUT} | ||
|
||
lint: | ||
runs-on: ubuntu-22.04 | ||
needs: setup | ||
|
@@ -114,40 +123,78 @@ jobs: | |
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
base: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
needs: setup | ||
timeout-minutes: 15 | ||
|
||
outputs: | ||
base: ${{ steps.init.outputs.base }} | ||
|
||
steps: | ||
- name: docker-config | ||
uses: containerbase/internal-tools@4453842226e67bc5d507c41b21184cc9220f4974 # v3.5.19 | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
show-progress: false | ||
|
||
- name: 📥 Setup Node.js | ||
uses: ./.github/actions/setup-node | ||
|
||
- name: build | ||
run: pnpm build | ||
|
||
- name: upload dist | ||
uses: actions/[email protected] | ||
with: | ||
command: docker-config | ||
name: dist | ||
path: | | ||
dist/ | ||
base: | ||
runs-on: ${{ matrix.arch.os }} | ||
name: base (${{ matrix.arch.name }}) | ||
needs: | ||
- setup | ||
- build | ||
timeout-minutes: 15 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
arch: | ||
- name: x86_64 | ||
os: ubuntu-22.04 | ||
tag: amd64 | ||
- name: aarch64 | ||
os: ubuntu-22.04-arm | ||
tag: arm64 | ||
|
||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
show-progress: false | ||
|
||
- name: init | ||
id: init | ||
- name: Check system | ||
uses: ./.github/actions/check | ||
|
||
- name: ⚙️ Init | ||
run: | | ||
export base="ttl.sh/$(uuidgen):1d" | ||
echo "OWNER=${OWNER,,}" >> ${GITHUB_ENV} | ||
echo "BASE=${base}" >> ${GITHUB_ENV} | ||
echo "base=${base}" >> ${GITHUB_OUTPUT} | ||
echo "BASE=ttl.sh/${{ needs.setup.outputs.uid }}/${{ matrix.arch.tag }}:1d" >> ${GITHUB_ENV} | ||
- name: 📥 Setup Node.js | ||
uses: ./.github/actions/setup-node | ||
|
||
- name: prepare apt proxy | ||
uses: ./.github/actions/prepare-proxy | ||
|
||
- name: build | ||
run: pnpm build | ||
- name: fetch dist | ||
uses: actions/[email protected] | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
- name: fix executable | ||
run: | | ||
chmod +x dist/cli/* | ||
chmod +x dist/docker/usr/local/containerbase/bin/* | ||
chmod +x dist/docker/usr/local/sbin/* | ||
- name: test distro | ||
run: docker buildx bake --set build-ttl.tags=${{env.BASE}} build-ttl | ||
|
@@ -161,6 +208,7 @@ jobs: | |
- bats | ||
- lint | ||
- vitest | ||
- build | ||
timeout-minutes: 30 | ||
|
||
strategy: | ||
|
@@ -175,15 +223,14 @@ jobs: | |
TAG: ${{ matrix.distro }} | ||
|
||
steps: | ||
- name: check docker | ||
run: | | ||
systemctl status docker | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
show-progress: false | ||
|
||
- name: init | ||
- name: Check system | ||
uses: ./.github/actions/check | ||
|
||
- name: ⚙️ Init | ||
run: | | ||
echo "OWNER=${OWNER,,}" >> ${GITHUB_ENV} | ||
|
@@ -193,8 +240,17 @@ jobs: | |
- name: prepare apt proxy | ||
uses: ./.github/actions/prepare-proxy | ||
|
||
- name: build | ||
run: pnpm build | ||
- name: fetch dist | ||
uses: actions/[email protected] | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
- name: fix executable | ||
run: | | ||
chmod +x dist/cli/* | ||
chmod +x dist/docker/usr/local/containerbase/bin/* | ||
chmod +x dist/docker/usr/local/sbin/* | ||
- name: test distro | ||
run: docker buildx bake test-distro --set settings.secrets=type=env,id=GITHUB_TOKEN | ||
|
@@ -206,11 +262,12 @@ jobs: | |
runs-on: ${{ matrix.arch.os }} | ||
name: ${{ matrix.tag }} (${{ matrix.arch.name }}) | ||
needs: | ||
- setup | ||
- base | ||
- bats | ||
- lint | ||
- vitest | ||
timeout-minutes: 30 | ||
timeout-minutes: 15 | ||
|
||
strategy: | ||
max-parallel: 10 | ||
|
@@ -238,25 +295,26 @@ jobs: | |
arch: | ||
- name: x86_64 | ||
os: ubuntu-22.04 | ||
tag: amd64 | ||
- name: aarch64 | ||
os: ubuntu-22.04-arm | ||
tag: arm64 | ||
|
||
env: | ||
TAG: ${{ matrix.tag }} | ||
|
||
steps: | ||
- name: check docker | ||
run: | | ||
systemctl status docker | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
show-progress: false | ||
|
||
- name: init | ||
- name: Check system | ||
uses: ./.github/actions/check | ||
|
||
- name: ⚙️ Init | ||
run: | | ||
echo "OWNER=${OWNER,,}" >> ${GITHUB_ENV} | ||
echo "BASE_IMAGE=${{ needs.base.outputs.base }}" >> ${GITHUB_ENV} | ||
echo "BASE_IMAGE=ttl.sh/${{ needs.setup.outputs.uid }}/${{ matrix.arch.tag }}:1d" >> ${GITHUB_ENV} | ||
- name: 📥 Setup Node.js | ||
uses: ./.github/actions/setup-node | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters