Skip to content

Commit

Permalink
Fix token (actions#65)
Browse files Browse the repository at this point in the history
Better to use an actions token than a specific user's PAT token which will change if the user changes employment
  • Loading branch information
cwille97 authored May 16, 2023
1 parent a9d75d1 commit c16b054
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ jobs:
uses: actions/checkout@v3
- name: Install extension
env:
GITHUB_TOKEN: ${{ secrets.REPO_WRITE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh extensions install actions/gh-actions-cache
- name: List Command
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.REPO_WRITE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cache_found=$(gh actions-cache list --key $CacheKey --limit 100 --branch $GITHUB_REF --order desc --sort created-at | grep $CacheKey)
echo $cache_found
[[ -z "$cache_found" ]] && exit 1 || echo "Cache List Successful"
- name: Delete Command
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.REPO_WRITE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cache_delete=$(gh actions-cache delete $CacheKey --branch $GITHUB_REF --confirm | grep "Deleted 1 cache entry with key")
echo $cache_delete
Expand Down

0 comments on commit c16b054

Please sign in to comment.