From 5a29f8a24fa2e2e152882269690ec4dc72da7372 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Fri, 11 Jul 2025 09:35:13 -0700 Subject: [PATCH] Remove ghcr build cache (#12602) Signed-off-by: Derek Nola --- .github/workflows/build-k3s.yaml | 23 ----------------------- .github/workflows/e2e.yaml | 2 -- .github/workflows/integration.yaml | 4 ---- .github/workflows/release.yml | 3 --- 4 files changed, 32 deletions(-) diff --git a/.github/workflows/build-k3s.yaml b/.github/workflows/build-k3s.yaml index 3a22548f93..3cc33acb97 100644 --- a/.github/workflows/build-k3s.yaml +++ b/.github/workflows/build-k3s.yaml @@ -19,18 +19,7 @@ on: description: 'Upload contents of build/out, used to build the k3s image externally' required: false default: false - cache: - type: string - description: 'Cache mode: "read", "write", or empty for no cache' - required: false - default: '' -# Note that is workflow requires the following permissions: -# contents: read -# If using the cache: write option, you will need: -# packages: write -# If using the cache: read option, you will need: -# packages: read permissions: contents: read @@ -38,8 +27,6 @@ jobs: build: name: Build # DO NOT CHANGE THIS NAME, we rely on it for INSTALL_K3S_PR functionality runs-on: ${{ contains(inputs.arch, 'arm') && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }} - permissions: - packages: write timeout-minutes: 20 env: BIN_EXT: ${{ inputs.os == 'windows' && '.exe' || '' }} @@ -69,14 +56,6 @@ jobs: echo "dirty=${DIRTY}" } >> "$GITHUB_OUTPUT" - - name: Login to GitHub Container Registry - if: inputs.cache == 'write' - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build K3s Binary Native if: inputs.arch == 'arm64' || inputs.arch == 'amd64' env: @@ -93,8 +72,6 @@ jobs: TREE_STATE=${{ steps.git_vars.outputs.tree_state }} COMMIT=${{ steps.git_vars.outputs.commit }} DIRTY=${{ steps.git_vars.outputs.dirty }} - cache-from: ${{ inputs.cache != '' && format('type=registry,ref=ghcr.io/{0}:cache-{1}', github.repository, inputs.arch) || '' }} - cache-to: ${{ inputs.cache == 'write' && format('type=registry,ref=ghcr.io/{0}:cache-{1},mode=max', github.repository, inputs.arch) || '' }} push: false provenance: mode=min outputs: type=local,dest=. diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 04821e065a..fea84c772f 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -35,7 +35,6 @@ jobs: uses: ./.github/workflows/build-k3s.yaml with: upload-image: true - cache: ${{ github.ref == 'refs/heads/master' && 'write' || 'read' }} build-arm64: uses: ./.github/workflows/build-k3s.yaml permissions: @@ -44,7 +43,6 @@ jobs: with: arch: arm64 upload-image: true - cache: ${{ github.ref == 'refs/heads/master' && 'write' || 'read' }} e2e: name: "E2E Tests" needs: build diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index fe4fac9b26..b73af03772 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -30,13 +30,9 @@ env: jobs: build: - permissions: - contents: read - packages: read uses: ./.github/workflows/build-k3s.yaml with: os: linux - cache: read build-windows: uses: ./.github/workflows/build-k3s.yaml with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 876d3d2c91..7ae7ee913a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,6 @@ jobs: name: Build Binary (amd64) uses: ./.github/workflows/build-k3s.yaml with: - cache: '' # No cache for release builds upload-build: true build-arm64: @@ -21,7 +20,6 @@ jobs: uses: ./.github/workflows/build-k3s.yaml with: arch: arm64 - cache: '' # No cache for release builds upload-build: true build-arm: @@ -29,7 +27,6 @@ jobs: uses: ./.github/workflows/build-k3s.yaml with: arch: arm - cache: '' # No cache for release builds upload-build: true push-release-image: