mirror of
https://github.com/ClementTsang/bottom.git
synced 2026-05-04 05:50:42 +00:00
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:
@@ -6,7 +6,7 @@
|
||||
# - FreeBSD (x86_64)
|
||||
# - macOS (aarch64)
|
||||
|
||||
name: "Build Releases"
|
||||
name: "build releases"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -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,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:
|
||||
|
||||
Reference in New Issue
Block a user