-
Notifications
You must be signed in to change notification settings - Fork 9
47 lines (33 loc) · 987 Bytes
/
clean_releases.yml
File metadata and controls
47 lines (33 loc) · 987 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Clean up old releases
on:
workflow_dispatch:
schedule:
# At minute 0 past hour 0. (see https://crontab.guru)
- cron: '00 00 * * *'
jobs:
delete_releases:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/[email protected]
with:
python-version: "3.10"
- name: Delete from here
shell: bash
run: |
pip install PyGithub
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} python scripts/clean_gh_releases.py
call-deploy-pip-page:
if: (github.event_name == 'push' && github.ref_name == 'main') || github.event_name == 'workflow_dispatch'
needs: [delete_releases]
permissions:
contents: read
id-token: write
pages: write
uses: ./.github/workflows/deploy_pip_page.yml
secrets: inherit # pass all secrets