Switch to public GitHub runner and gha cache

This commit is contained in:
Mikael Elkiaer 2023-09-19 19:53:11 +00:00
parent 87113eaac4
commit 70384eae3c

View File

@ -25,7 +25,7 @@ env:
jobs: jobs:
build: build:
runs-on: self-hosted runs-on: ubuntu-latest
permissions: permissions:
contents: read contents: read
packages: write packages: write
@ -49,11 +49,11 @@ jobs:
# https://github.com/marketplace/actions/docker-setup-buildx#with-qemu # https://github.com/marketplace/actions/docker-setup-buildx#with-qemu
- name: Setup QEMU - name: Setup QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
# Workaround: https://github.com/docker/build-push-action/issues/461 # Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx - name: Setup Docker buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
# This step is being disabled because the runner is on a self-hosted machine # This step is being disabled because the runner is on a self-hosted machine
# where the cache will stick between runs. # where the cache will stick between runs.
# - name: Cache Docker layers # - name: Cache Docker layers
@ -101,8 +101,8 @@ jobs:
# https://github.com/docker/setup-qemu-action#about # https://github.com/docker/setup-qemu-action#about
# platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6 # platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=gha
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max cache-to: type=gha,mode=max
# Sign the resulting Docker image digest except on PRs. # Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker # This will only write to the public Rekor transparency log when the Docker
@ -120,7 +120,8 @@ jobs:
# Temp fix # Temp fix
# https://github.com/docker/build-push-action/issues/252 # https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896 # https://github.com/moby/buildkit/issues/1896
- name: Move cache # INFO: MikaelElkiaer: Obsolete when using gha cache exporter
run: | # - name: Move cache
rm -rf /tmp/.buildx-cache # run: |
mv /tmp/.buildx-cache-new /tmp/.buildx-cache # rm -rf /tmp/.buildx-cache
# mv /tmp/.buildx-cache-new /tmp/.buildx-cache