mirror of
https://github.com/ClementTsang/bottom.git
synced 2024-09-19 23:47:53 +03:00
7ae8e66a3a
* ci: add cache clearing to PR merges * some renaming * small change to force cache * add manual run option
27 lines
629 B
YAML
27 lines
629 B
YAML
# 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
|