Skip to content

Commit

Permalink
add write permission for artifact deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinSchiller committed Feb 4, 2024
1 parent c2d60cb commit d79ec39
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/test_docker_debian_codename_sub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ on:
type: number
default: 5000

permissions:
actions: write

# let only one instance run the test so cache is not corrupted.
# cancel already running instances as only the last run will be relevant
concurrency:
Expand Down Expand Up @@ -170,6 +173,8 @@ jobs:
# cleanup after test execution
cleanup:
permissions:
actions: write
# run only if tests didn't fail: keep the artifact to make job reruns possible
if: ${{ !failure() }}
needs: [build, test]
Expand All @@ -180,3 +185,5 @@ jobs:
uses: geekyeggo/delete-artifact@v4
with:
name: ${{ needs.build.outputs.image_file_name }}
# on PRs no write permissions are granted, so this fails in this cases
failOnError: false

0 comments on commit d79ec39

Please sign in to comment.