Skip to content

Commit

Permalink
use env, add slack
Browse files Browse the repository at this point in the history
  • Loading branch information
swryan committed Nov 29, 2023
1 parent 000e3ac commit d594e79
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/update_integrated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,26 @@ jobs:
python-version: 3.11

- name: Run script
run: python ./.github/scripts/update_integrated.py ${{ github.event.inputs.poem_integrated }}
env:
POEM_ID: ${{ github.event.inputs.poem_integrated }}
run: python ./.github/scripts/update_integrated.py $POEM_ID

- name: Commit and push if changed
env:
POEM_ID: ${{ github.event.inputs.poem_integrated }}
run: |
git add .
git diff
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
POEM_NO="$(echo ${{ github.event.inputs.poem_integrated }} | sed 's/^0*//')"
POEM_NO="$(echo $POEM_ID | sed 's/^0*//')"
POEM_ID="$(printf '%03d' $POEM_NO)"
git commit -m "Mark POEM_$POEM_ID as Integrated" -a || echo "No changes to commit"
git push
git push
- name: Notify slack
uses: act10ns/[email protected]
with:
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
status: ${{ job.status }}
if: always()

0 comments on commit d594e79

Please sign in to comment.