diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index bb7902b81bf1..d80defb2f9fd 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -345,6 +345,7 @@ jobs: steps: # https://github.com/actions/checkout/issues/273#issuecomment-642908752 (see below) - name: "Pre: Fixup directories" + if: matrix.arch == 'arm' run: find . -type d -not -perm /u+w -exec chmod u+w '{}' \; - name: Check out code into the Go module directory @@ -447,9 +448,9 @@ jobs: # post build action. So, as a workaround, ensure that all subdirectories # are writable. - name: "Post: Fixup directories" - if: always() + if: always() && matrix.arch == 'arm' run: find . -type d -not -perm /u+w -exec chmod u+w '{}' \; - name: "Docker prune" - if: always() + if: always() && matrix.arch == 'arm' run: docker system prune --force --filter "until=$((24*7))h" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e6d5db5c8c46..a44e2fc3a82f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -222,14 +222,6 @@ jobs: SEGMENT_TOKEN: ${{ secrets.SEGMENT_WRITE_KEY_PROD }} EULA_NOTICE: ${{ secrets.EULA_NOTICE }} steps: - # https://github.com/actions/checkout/issues/273#issuecomment-642908752 (see below) - - name: "Pre: Fixup directories" - run: find . -type d -not -perm /u+w -exec chmod u+w '{}' \; - - - name: Clean Docker before build - run: | - docker system prune --all --volumes --force - - name: Check out code into the Go module directory uses: actions/checkout@v4 @@ -307,22 +299,6 @@ jobs: asset_name: k0s-airgap-bundle-${{ needs.release.outputs.tag_name }}-arm64 asset_content_type: application/octet-stream - - name: Clean Docker after build - if: always() - run: | - docker system prune --all --volumes --force - - # https://github.com/actions/checkout/issues/273#issuecomment-642908752 - # Golang mod cache tends to set directories to read-only, which breaks any - # attempts to simply remove those directories. The `make clean-gocache` - # target takes care of this, but the mod cache can't be deleted here, - # since it shall be cached across builds, and caching takes place as a - # post build action. So, as a workaround, ensure that all subdirectories - # are writable. - - name: "Post: Fixup directories" - if: always() - run: find . -type d -not -perm /u+w -exec chmod u+w '{}' \; - armv7: needs: release runs-on: [self-hosted, linux, arm]