mirror of
https://github.com/RetroDECK/components-template.git
synced 2024-11-21 19:05:39 +00:00
PR: troubleshooting the PR not being created
This commit is contained in:
parent
ac5344cca5
commit
dbe7cd6a2d
15
.github/workflows/pr_from_upstream.yml
vendored
15
.github/workflows/pr_from_upstream.yml
vendored
|
@ -63,23 +63,16 @@ jobs:
|
||||||
# Fetch changes from the upstream repository without merging
|
# Fetch changes from the upstream repository without merging
|
||||||
git fetch "${{ env.UPSTREAM_REPO }}" "${{ env.TARGET_BRANCH }}"
|
git fetch "${{ env.UPSTREAM_REPO }}" "${{ env.TARGET_BRANCH }}"
|
||||||
|
|
||||||
# Check if there are any changes to commit
|
git add -A
|
||||||
if git diff --exit-code "origin/${{ env.TARGET_BRANCH }}"; then
|
git commit -m "Updating ${{ github.event.repository.name }} with upstream changes"
|
||||||
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
|
|
||||||
|
|
||||||
- name: Push changes to new branch
|
- name: Push changes to new branch
|
||||||
if: success() && env.SKIP_PR == 'false'
|
if: success()
|
||||||
run: |
|
run: |
|
||||||
git push origin "${{ env.BRANCH_NAME }}"
|
git push origin "${{ env.BRANCH_NAME }}"
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
if: success() && env.SKIP_PR == 'false'
|
if: success()
|
||||||
uses: peter-evans/create-pull-request@v7.0.5
|
uses: peter-evans/create-pull-request@v7.0.5
|
||||||
with:
|
with:
|
||||||
token: ${{ steps.generate-rekku-token.outputs.token || secrets.GITHUB_TOKEN }}
|
token: ${{ steps.generate-rekku-token.outputs.token || secrets.GITHUB_TOKEN }}
|
||||||
|
|
Loading…
Reference in a new issue