From 9e21a2912d400b04a00222fb37eb42c90902f7c8 Mon Sep 17 00:00:00 2001 From: Ron <45816308+rjaegers@users.noreply.github.com> Date: Wed, 8 Nov 2023 10:47:47 +0000 Subject: [PATCH 1/3] chore: prime GitHub cache for Docker build on main --- .github/workflows/prime-cache.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/prime-cache.yml diff --git a/.github/workflows/prime-cache.yml b/.github/workflows/prime-cache.yml new file mode 100644 index 00000000..abac8095 --- /dev/null +++ b/.github/workflows/prime-cache.yml @@ -0,0 +1,27 @@ +--- +name: Prime Cache + +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + +jobs: + prime-docker-cache: + runs-on: ubuntu-latest + steps: + - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 + - uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 + with: + with: + file: .devcontainer/Dockerfile + platforms: linux/amd64,linux/arm64 + cache-from: type=gha + cache-to: type=gha,mode=max From 497a6607036a0e9162db004d993ed546e70c3193 Mon Sep 17 00:00:00 2001 From: Ron <45816308+rjaegers@users.noreply.github.com> Date: Wed, 8 Nov 2023 10:58:08 +0000 Subject: [PATCH 2/3] chore: remove duplicate 'with' key --- .github/workflows/prime-cache.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/prime-cache.yml b/.github/workflows/prime-cache.yml index abac8095..23ddfecd 100644 --- a/.github/workflows/prime-cache.yml +++ b/.github/workflows/prime-cache.yml @@ -19,7 +19,6 @@ jobs: - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 - with: with: file: .devcontainer/Dockerfile platforms: linux/amd64,linux/arm64 From 07fbac43c46acfd5d78c18fce3c61cd41b36b114 Mon Sep 17 00:00:00 2001 From: Ron <45816308+rjaegers@users.noreply.github.com> Date: Wed, 8 Nov 2023 16:20:33 +0000 Subject: [PATCH 3/3] ci: prime xwin cache from main --- .github/workflows/ci.yml | 4 ---- .github/workflows/prime-cache.yml | 11 +++++++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6431c057..ecb037ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,10 +39,6 @@ jobs: run: | set -Eeuo pipefail docker run --rm --mount type=bind,src="$(pwd)/test",dst=/ws -w /ws ${{ github.repository }}:test bats --formatter junit testsuite.bats | tee test-report.xml - - uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 - with: - path: test/.xwin-cache - key: xwin-cache - uses: EnricoMi/publish-unit-test-result-action@ca89ad036b5fcd524c1017287fb01b5139908408 # v2.11.0 if: always() with: diff --git a/.github/workflows/prime-cache.yml b/.github/workflows/prime-cache.yml index 23ddfecd..d4135744 100644 --- a/.github/workflows/prime-cache.yml +++ b/.github/workflows/prime-cache.yml @@ -24,3 +24,14 @@ jobs: platforms: linux/amd64,linux/arm64 cache-from: type=gha cache-to: type=gha,mode=max + prime-xwin-cache: + runs-on: ubuntu-latest + steps: + - run: | + set -Eeuo pipefail + mkdir test + docker run --rm --mount type=bind,src="$(pwd)/test",dst=/ws -w /ws ghcr.io/${{ github.repository }}:latest xwin --accept-license splat --preserve-ms-arch-notation + - uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 + with: + path: test/.xwin-cache + key: xwin-cache