Skip to content

Commit

Permalink
Remove some workarounds for self-hosted arm64 runners
Browse files Browse the repository at this point in the history
The new self-hosted arm64 runners are ephemeral one-shot runners. No
more manual cleanup required.

Signed-off-by: Tom Wieczorek <[email protected]>
  • Loading branch information
twz123 committed Jan 9, 2024
1 parent a8bf7be commit 1da926d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 26 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
24 changes: 0 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 1da926d

Please sign in to comment.