Update POEM status to Integrated #13
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
# This workflow updates the status of a POEM to 'Integrated' | |
name: Update POEM status to Integrated | |
on: | |
# workflow_dispatch allows to run your workflow manually | |
workflow_dispatch: | |
inputs: | |
poem_integrated: | |
description: 'ID of POEM to be marked as Integrated' | |
required: true | |
default: 0 | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
integrate_poem: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Run script | |
run: python ./.github/scripts/update_integrated.py ${{ github.event.inputs.poem_integrated }} | |
- name: Commit and push if changed | |
run: | | |
git add . | |
git diff | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Action" | |
POEM_ID="$(printf '%03d' ${{ github.event.inputs.poem_integrated }})" | |
git commit -m "Mark POEM_$POEM_ID as Integrated" -a || echo "No changes to commit" | |
git push |