Skip to content

Commit

Permalink
Try fixing cache cleanup action
Browse files Browse the repository at this point in the history
Signed-off-by: David Cassany <dcassany@suse.com>
  • Loading branch information
davidcassany committed Jul 10, 2024
1 parent 045fe6f commit 1215a59
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
7 changes: 2 additions & 5 deletions .github/actions/cache_cleanup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ inputs:
description: pr cache to cleanup
required: true
type: string
token:
description: token for the gh client
required: true
type: string

runs:
using: composite
steps:
- name: Cleanup
shell: bash
run: |
set -x
gh extension install actions/gh-actions-cache
echo "Fetching list of cache key"
Expand All @@ -30,6 +28,5 @@ runs:
done
echo "Done"
env:
GH_TOKEN: ${{ inputs.token }}
REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ inputs.pr }}/merge
3 changes: 2 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ jobs:
uses: ./.github/actions/cache_cleanup
with:
pr: ${{ github.event.pull_request.number }}
token: $${{ secrets.GITHUB_TOKEN }}
env:
GH_TOKEN: $${{ secrets.GITHUB_TOKEN }}
- if: ${{ steps.cache-toolkit.outputs.cache-hit != 'true' }}
name: Build toolkit
env:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/cache-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ jobs:
uses: ./.github/actions/cache_cleanup
with:
pr: ${{ github.event.pull_request.number }}
token: ${{ secrets.GITHUB_TOKEN }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1215a59

Please sign in to comment.