* chore: cleanup actions * Update .github/workflows/shared-issues.yml Co-authored-by: Topher Lubaway <asimplechris@gmail.com> * Update .github/workflows/shared-issues.yml Co-authored-by: Topher Lubaway <asimplechris@gmail.com> * Update .github/workflows/shared-pulls.yml Co-authored-by: Topher Lubaway <asimplechris@gmail.com> * Update .github/workflows/test-performance-command.yml Co-authored-by: Topher Lubaway <asimplechris@gmail.com> Co-authored-by: Topher Lubaway <asimplechris@gmail.com>
36 lines
1.0 KiB
YAML
36 lines
1.0 KiB
YAML
name: Cleanup old GH workflow runs
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 12 * * *' # runs at 12:00 UTC everyday
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: checkout repo content
|
|
uses: actions/checkout@v2 # checkout the repository content to github runner
|
|
|
|
- name: setup python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.9.13' # install the python version needed
|
|
|
|
- name: install python packages
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install PyGithub slack_sdk
|
|
|
|
- name: execute cleanup workflow py script
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: python tools/bin/cleanup-workflow-runs.py --delete
|
|
|
|
- name: execute dormant workflow py script
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
SLACK_TOKEN: ${{ secrets.SLACK_BOT_TOKEN_AIRBYTE_TEAM }}
|
|
|
|
run: python tools/bin/identify-dormant-workflows.py
|