summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2022-11-06 03:44:02 -0500
committerGitHub <noreply@github.com>2022-11-06 03:44:02 -0500
commit7ae8e66a3a43d126e95d0ce977be93ed4e4949f6 (patch)
tree7f1a55bf27aeed38758cfb146603cc4df0d9f458 /.github/workflows
parent29bc0b67bae1598cae1fa5202dae3999c7c05f69 (diff)
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
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build_releases.yml2
-rw-r--r--.github/workflows/clear-pr-cache.yml26
-rw-r--r--.github/workflows/test-docs.yml2
3 files changed, 28 insertions, 2 deletions
diff --git a/.github/workflows/build_releases.yml b/.github/workflows/build_releases.yml
index a7d536a4..bc090a4c 100644
--- a/.github/workflows/build_releases.yml
+++ b/.github/workflows/build_releases.yml
@@ -6,7 +6,7 @@
# - FreeBSD (x86_64)
# - macOS (aarch64)
-name: "Build Releases"
+name: "build releases"
on:
workflow_dispatch:
diff --git a/.github/workflows/clear-pr-cache.yml b/.github/workflows/clear-pr-cache.yml
new file mode 100644
index 00000000..356884d4
--- /dev/null
+++ b/.github/workflows/clear-pr-cache.yml
@@ -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
diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml
index e46bd909..8364e493 100644
--- a/.github/workflows/test-docs.yml
+++ b/.github/workflows/test-docs.yml
@@ -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: