forked from OpenMDAO/POEMs
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 1.1 KB
/
update_integrated.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# 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