ci: add cache clearing to PR merges (#874)

* ci: add cache clearing to PR merges

* some renaming

* small change to force cache

* add manual run option
This commit is contained in:
Clement Tsang
2022-11-06 03:44:02 -05:00
committed by GitHub
parent 29bc0b67ba
commit 7ae8e66a3a
5 changed files with 87 additions and 3 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
# - FreeBSD (x86_64)
# - macOS (aarch64)
name: "Build Releases"
name: "build releases"
on:
workflow_dispatch:
+26
View File
@@ -0,0 +1,26 @@
# Simple job to clear the cache used by a PR when it is closed/merged.
name: "clear PR cache"
on:
workflow_dispatch:
inputs:
id:
description: "Which id to clear:"
required: false
pull_request:
types:
- closed
jobs:
clear-cache:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- run: |
if [[ -z "${{ github.event.inputs.id }}" ]]; then
python ./scripts/clear_cache.py ${{ github.event.pull_request.number }}
else
python ./scripts/clear_cache.py ${{ github.event.inputs.id }}
fi
+1 -1
View File
@@ -1,6 +1,6 @@
# Small CI workflow to test if mkdocs documentation can be successfully built.
name: test-docs
name: test docs
on:
workflow_dispatch:
pull_request: