mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
fix: dont nag maintainers when nothing needs to be done (#2418)
This commit is contained in:
parent
32e04458c6
commit
8a49a11dc0
1 changed files with 11 additions and 0 deletions
11
.github/workflows/update-submodules.yml
vendored
11
.github/workflows/update-submodules.yml
vendored
|
|
@ -41,6 +41,7 @@ jobs:
|
||||||
git config --global user.email noreply@github.com
|
git config --global user.email noreply@github.com
|
||||||
git config --global pull.rebase false
|
git config --global pull.rebase false
|
||||||
- name: Update submodule
|
- name: Update submodule
|
||||||
|
id: update-submodule
|
||||||
run: |
|
run: |
|
||||||
git checkout -b ${{ matrix.submodule.branch-prefix }}-${{ matrix.branches }}
|
git checkout -b ${{ matrix.submodule.branch-prefix }}-${{ matrix.branches }}
|
||||||
git reset --hard origin/${{ matrix.branches }}
|
git reset --hard origin/${{ matrix.branches }}
|
||||||
|
|
@ -49,9 +50,19 @@ jobs:
|
||||||
git reset --hard origin/${{ matrix.submodule.branch }}
|
git reset --hard origin/${{ matrix.submodule.branch }}
|
||||||
cd ../..
|
cd ../..
|
||||||
git add ${{ matrix.submodule.path }}
|
git add ${{ matrix.submodule.path }}
|
||||||
|
|
||||||
|
if [[ -z "$(git status --porcelain --untracked-files=no)" ]]; then
|
||||||
|
echo "No changes detected!"
|
||||||
|
echo "SUBMIT_PR=false" >> "$GITHUB_OUTPUT"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
git commit --message "Update ${{ matrix.submodule.name }}"
|
git commit --message "Update ${{ matrix.submodule.name }}"
|
||||||
git push origin ${{ matrix.submodule.branch-prefix }}-${{ matrix.branches }} --force
|
git push origin ${{ matrix.submodule.branch-prefix }}-${{ matrix.branches }} --force
|
||||||
|
echo "SUBMIT_PR=true" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Create PR
|
- name: Create PR
|
||||||
|
if: ${{ steps.update-submodule.outputs.SUBMIT_PR == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
echo ${{ secrets.UPDATE_PAT }} | gh auth login --with-token
|
echo ${{ secrets.UPDATE_PAT }} | gh auth login --with-token
|
||||||
prNumber=$(gh pr list --base ${{ matrix.branches }} --head ${{ matrix.submodule.branch-prefix }}-${{ matrix.branches }} --state open --json number --template "{{range .}}{{.number}}{{end}}")
|
prNumber=$(gh pr list --base ${{ matrix.branches }} --head ${{ matrix.submodule.branch-prefix }}-${{ matrix.branches }} --state open --json number --template "{{range .}}{{.number}}{{end}}")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue