stackoverflow.com/a/54901965/461982 #475
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
name: Purge Actions | |
on: | |
push: | |
branches: [ master ] | |
permissions: | |
contents: read | |
actions: write | |
jobs: | |
clean: | |
runs-on: ubuntu-latest | |
timeout-minutes: 2 | |
steps: | |
- name: Remove artifacts | |
continue-on-error: true | |
uses: c-hive/[email protected] | |
with: | |
age: '2 days' # '<number> <unit>', parsed by Moment.js | |
# Optional inputs | |
# skip-tags: true | |
skip-recent: 2 | |
- name: Purge cache | |
continue-on-error: true | |
uses: MyAlbum/purge-cache@v1 | |
with: | |
max-age: 172800 # 2 days, default: 7 days since last use |