Peloton #386
This file contains 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: Peloton | |
on: | |
schedule: | |
- cron: "50 02 * * *" | |
workflow_dispatch: | |
inputs: | |
update_loop_minutes: | |
description: "Number of minutes to keep updating for, after full refresh." | |
required: true | |
default: 0 | |
jobs: | |
update_peloton_project: | |
name: "Update Peloton Project Board" | |
if: github.repository == 'SciTools/.github' | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Generate token | |
id: generate_token | |
uses: tibdex/github-app-token@v1 | |
with: | |
app_id: ${{ secrets.AUTH_APP_ID }} | |
private_key: ${{ secrets.AUTH_APP_PRIVATE_KEY }} | |
- name: "Checkout repo" | |
uses: actions/checkout@v3 | |
- name: "Set up environment" | |
run: conda install -c conda-forge --file peloton/requirements.txt | |
- name: "Update the Peloton Project" | |
run: | | |
if [ -z "${{ github.event.inputs.update_loop_minutes }}" ]; then | |
update_loop_minutes=0 | |
else | |
update_loop_minutes=${{ github.event.inputs.update_loop_minutes }} | |
fi | |
$CONDA/bin/python peloton/update_project.py \ | |
--verbose \ | |
--bearer_token "${{ steps.generate_token.outputs.token }}" \ | |
--update_loop_minutes $update_loop_minutes |