Skip to content

Commit 531a5d8

Browse files
authored
Fix: make update contribs into a monthy cron with manual dispatch available!
Fix: setup metadata update as cron
2 parents 1f39ef8 + 4fe5aac commit 531a5d8

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed
Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Update Contributors
22

33
on:
4-
pull_request:
5-
push:
6-
branches:
7-
- mai
4+
workflow-dispatch:
5+
schedule:
6+
# Runs on the first of each month (see https://crontab.guru)
7+
- cron: "* * 1 * *"
88
jobs:
99
run-meta:
1010
runs-on: ubuntu-latest
@@ -19,17 +19,13 @@ jobs:
1919
run: |
2020
# install pip=>20.1 to use "pip cache dir"
2121
python -m pip install --upgrade pip wheel
22-
echo "$PWD"
23-
git branch
2422
- name: Install pyosmeta and run update contribs
2523
env:
26-
GITHUB_TOKEN: ${{ github.token }}
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2725
run: |
2826
pip install pyosmeta@git+https://github.com/pyopensci/update-web-metadata
2927
echo "$PWD"
30-
# Skip error for when this pr actually works
31-
# python -bb -W error scripts/parse-contributors.py
32-
python scripts/parse-contributors.py
28+
python -b -W default scripts/parse-contributors.py
3329
- name: Create Pull Request
3430
uses: peter-evans/create-pull-request@v5
3531
with:
@@ -41,6 +37,6 @@ jobs:
4137
delete-branch: true
4238
title: Update new contributors
4339
env:
44-
# Token needed to provide permissions to bot to push to branch
45-
# https://github.com/peter-evans/create-pull-request/issues/48#issuecomment-536204092
40+
# Custom token needed to trigger PR checks, as GITHUB_TOKEN won't
41+
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
4642
GITHUB_TOKEN: ${{ secrets.PYOS_PR_TOKEN }}

0 commit comments

Comments
 (0)