Skip to content

Commit

Permalink
Commit updated instances data to the PR branch if triggered by a PR
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultamartin committed Sep 13, 2023
1 parent 1ac436e commit 63755b9
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/update-public-instances.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,23 @@ jobs:
cd piu && yarn && yarn run update && cd ..
cp piu/instances.toml morg/content/public-instances/instances.toml
- name: Commit and push data
- name: Commit and push data (within PR)
if: ${{ github.event_name == 'pull_request' }}
run: |
cd morg
git config --global user.name "GitHub CI"
git config --global user.email "[email protected]"
git add ecosystem/public-instances/instances.toml
git switch ${ github.ref_name }
git add public-instances/instances.toml
git commit -m "Update instances.toml"
git push
working-directory: morg

- name: Commit and push data (scheduled)
if: ${{ github.event_name == 'schedule' }}
run: |
git config --global user.name "GitHub CI"
git config --global user.email "[email protected]"
git add public-instances/instances.toml
git commit -m "Update instances.toml"
git push
working-directory: morg

0 comments on commit 63755b9

Please sign in to comment.