Implement Nexus Suppression #141
Workflow file for this run
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: Prune GitHub Actions Caches | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
pull_request: | |
types: | |
- closed | |
workflow_dispatch: | |
inputs: | |
date_interval: | |
description: How old of the cache should be flushed? | |
required: true | |
default: 'P2D' | |
env: | |
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
REPO: ${{ github.repository }} | |
jobs: | |
prune: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run prune-cache on pull requests | |
if: github.event_name == 'pull_request' | |
run: | | |
bin/prune-cache ${{ env.REPO }} --pr-branch ${{ env.PR_BRANCH }} | |
env: | |
PR_BRANCH: ${{ github.event.pull_request.number }} | |
- name: Run prune-cache on schedule | |
if: github.event_name == 'schedule' | |
run: | | |
bin/prune-cache ${{ env.REPO }} --schedule | |
- name: Run prune-cache on workflow dispatch | |
if: github.event_name == 'workflow_dispatch' | |
run: | | |
bin/prune-cache ${{ env.REPO }} --schedule | |
env: | |
DATE_INTERVAL: ${{ inputs.date_interval }} |