mirror of
https://github.com/RetroDECK/components-template.git
synced 2024-11-21 19:05:39 +00:00
PR: exiting if no changes are staged
This commit is contained in:
parent
d17fa582a8
commit
46a278f4a0
8
.github/workflows/pr_from_upstream.yml
vendored
8
.github/workflows/pr_from_upstream.yml
vendored
|
@ -75,6 +75,12 @@ jobs:
|
||||||
git commit -m "Merge changes from upstream ${{ env.UPSTREAM_REPO }}/${{ env.TARGET_BRANCH }} with conflicts"
|
git commit -m "Merge changes from upstream ${{ env.UPSTREAM_REPO }}/${{ env.TARGET_BRANCH }} with conflicts"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if any changes were introduced by the merge
|
||||||
|
if git diff --exit-code; then
|
||||||
|
echo "No changes detected after merging. Exiting."
|
||||||
|
exit 0 # Exit the workflow if no changes are detected
|
||||||
|
fi
|
||||||
|
|
||||||
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
|
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Push changes to new branch
|
- name: Push changes to new branch
|
||||||
|
@ -129,4 +135,4 @@ jobs:
|
||||||
```bash
|
```bash
|
||||||
git push origin ${{ env.BRANCH_NAME }}
|
git push origin ${{ env.BRANCH_NAME }}
|
||||||
```
|
```
|
||||||
base: ${{ env.TARGET_BRANCH }}
|
base: ${{ env.TARGET_BRANCH }}
|
||||||
|
|
Loading…
Reference in a new issue