PR: troubleshooting the PR not being created

This commit is contained in:
XargonWan 2024-11-06 10:48:06 +09:00
parent 0d5712524f
commit 4c67d42c4c

View file

@ -45,6 +45,7 @@ jobs:
echo "TARGET_BRANCH=${TARGET_BRANCH}" >> $GITHUB_ENV
- name: Sync from Upstream Repository
continue-on-error: true
env:
BRANCH_NAME: "feat/update-from-upstream"
run: |
@ -67,15 +68,9 @@ jobs:
git diff
# Check if there are any changes to commit
if git diff --exit-code "origin/${{ env.TARGET_BRANCH }}"; then
echo "No changes detected from upstream. Exiting without creating PR."
echo "SKIP_PR=true" >> $GITHUB_ENV
else
git add -A
git commit -m "Updating ${{ github.event.repository.name }} with upstream changes"
echo "SKIP_PR=false" >> $GITHUB_ENV
fi
echo "GIT_DIFF<<EOF" >> $GITHUB_ENV
git diff >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Push changes to new branch
if: success() && env.SKIP_PR == 'false'
@ -95,6 +90,11 @@ jobs:
- **Repository**: ${{ env.UPSTREAM_REPO }}
- **Branch**: ${{ env.TARGET_BRANCH }}
## Differences
```
${{ env.GIT_DIFF }}
```
## Conflict Resolution Instructions
If there are conflicts in this PR, you can resolve them locally by following these steps: