-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add automatic and manual branch cache cleanup (#441)
* Branch cache clean * Add cache cleaning workflows * Update package-lock.json
- Loading branch information
Showing
5 changed files
with
74 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: "Cache Cleanup - Automatic" | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
|
||
jobs: | ||
|
||
cache-purge: | ||
name: "Purge Actions cache" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: "Delete Branch Cache Action" | ||
uses: snnaplab/delete-branch-cache-action@v1.0.0 | ||
with: | ||
# Specify explicitly because the ref at the time of merging will be a branch name such as 'main', 'develop' | ||
ref: refs/pull/${{ github.event.number }}/merge | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
2 changes: 1 addition & 1 deletion
2
.github/workflows/cleanup-cache.yml → .github/workflows/cleanup-cache-manual.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: "Cleanup - Cache" | ||
name: "Cache Cleanup - Manual" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.