Skip to content

Commit

Permalink
ci: clean up by close pull_request_target
Browse files Browse the repository at this point in the history
  • Loading branch information
Yakutoc committed Nov 13, 2023
1 parent 6ef2cc8 commit d019175
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/clean-pr-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ on:
pull_request:
types: [closed]
branches:
- dev
- master
pull_request_target:
types: [closed]
branches:
- dev

concurrency:
# New commit on branch cancels running workflows of the same branch
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/cleanup-cache-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
pull_request:
types:
- closed
pull_request_target:
types:
- closed

jobs:
cleanup:
Expand All @@ -16,14 +19,14 @@ jobs:
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
Expand Down

0 comments on commit d019175

Please sign in to comment.