Update Contribs & reviewers #190
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Contribs & reviewers | |
on: | |
workflow_dispatch: | |
schedule: | |
# Runs daily at 03:21 UTC (see https://crontab.guru) | |
# (Choosing an "odd" time so CI doesn't get overloaded at mightnight exactly.) | |
- cron: "3 21 * * *" | |
jobs: | |
run-meta: | |
if: github.repository_owner == 'pyopensci' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Upgrade pip | |
run: | | |
# install pip=>20.1 to use "pip cache dir" | |
python -m pip install --upgrade pip wheel | |
- name: Install pyosmeta and run update contribs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
pip install pyosmeta | |
update-contributors | |
update-reviews | |
update-review-teams | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
add-paths: | | |
_data/contributors.yml | |
_data/packages.yml | |
author: Leah <leah@pyopensci.org> | |
base: main | |
branch: contribs | |
commit-message: "Update: Contributor & review file update" | |
delete-branch: true | |
title: Update contributor and review data | |
labels: | | |
pre-commit.ci autofix | |
env: | |
# Custom token needed to trigger PR checks, as GITHUB_TOKEN won't | |
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs | |
GITHUB_TOKEN: ${{ secrets.PYOS_PR_TOKEN }} | |
- name: Slack Notification | |
uses: rtCamp/action-slack-notify@v2 | |
if: failure() | |
env: | |
SLACK_CHANNEL: pyos-infrastructure | |
SLACK_COLOR: '#db540b' | |
SLACK_LINK_NAMES: true | |
SLACKIFY_MARKDOWN: true | |
SLACK_TITLE: "Update Contribs & Reviewers Workflow Failed" | |
SLACK_MESSAGE: "The **Update Contribs & Reviewers** workflow failed for pyopensci.org. Please check the logs." | |
SLACK_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} |