From b290e724d8067d8bad53d57f5f98a398e0f59663 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Thu, 9 Jul 2026 17:13:15 +0200 Subject: [PATCH] ci: migrate from buildjet to cache action Buildjet stops their service so we must use the github services. ref: https://buildjet.com/for-github-actions/blog/we-are-shutting-down Signed-off-by: Ferdinand Thiessen --- .github/workflows/command-compile.yml | 2 +- .github/workflows/cypress.yml | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/command-compile.yml b/.github/workflows/command-compile.yml index 45dc8de4a4930..2d8af4f1e7eb5 100644 --- a/.github/workflows/command-compile.yml +++ b/.github/workflows/command-compile.yml @@ -97,7 +97,7 @@ jobs: steps: - name: Restore cached git repository - uses: buildjet/cache@3e70d19e31d6a8030aeddf6ed8dbe601f94d09f4 # v4.0.2 + uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: .git key: git-repo diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 5fe662f7fe788..9c8cb5cc3d1a4 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -85,7 +85,7 @@ jobs: TESTING=true npm run build --if-present - name: Save context - uses: buildjet/cache/save@3e70d19e31d6a8030aeddf6ed8dbe601f94d09f4 # v4.0.2 + uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: key: cypress-context-${{ github.run_id }} path: ./ @@ -153,7 +153,8 @@ jobs: steps: - name: Restore context - uses: buildjet/cache/restore@3e70d19e31d6a8030aeddf6ed8dbe601f94d09f4 # v4.0.2 + id: cache + uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: fail-on-cache-miss: true key: cypress-context-${{ github.run_id }} @@ -232,6 +233,23 @@ jobs: name: cypress-summary + permissions: + # `actions:write` permission is required to delete caches + # See also: https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + actions: write + contents: read + steps: - name: Summary status run: if ${{ needs.init.result != 'success' || ( needs.cypress.result != 'success' && needs.cypress.result != 'skipped' ) }}; then exit 1; fi + + - name: Delete cache on success + run: | + ## Setting this to not fail the workflow while deleting cache keys. + set +e + echo "Deleting cache..." + gh cache delete 'cypress-context-${{ github.run_id }}' + echo "Done" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }}