Skip to content

Commit

Permalink
run steps conditional on changes to the list (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidari authored Nov 19, 2024
1 parent eae31eb commit f9201d0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/update-authorized-users.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ jobs:
run: |
Rscript src/code/get_authorized_users.r
- name: Check for Changes
id: check_diff
run: |
git diff --exit-code auxiliary-data/authorized_users.txt || echo "changed=true" >> $GITHUB_ENV
- name: Commit changes
if: env.changed == 'true'
uses: EndBug/add-and-commit@v9
with:
message: "Update authorized users"
Expand All @@ -39,7 +45,7 @@ jobs:
new_branch: update-authorized-users

- name: Create pull request
id: create_pr
if: env.changed == 'true'
run: |
gh pr create --base main --head update-authorized-users --title "Update authorized users" --body "This PR updates the authorized users list based on the latest metadata."
env:
Expand Down

0 comments on commit f9201d0

Please sign in to comment.