From dbe7cd6a2defdc1fed7cf52eaf89fdb8f95613c2 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 6 Nov 2024 10:13:03 +0900 Subject: [PATCH] PR: troubleshooting the PR not being created --- .github/workflows/pr_from_upstream.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pr_from_upstream.yml b/.github/workflows/pr_from_upstream.yml index 057b755..38e7c00 100644 --- a/.github/workflows/pr_from_upstream.yml +++ b/.github/workflows/pr_from_upstream.yml @@ -63,23 +63,16 @@ jobs: # Fetch changes from the upstream repository without merging git fetch "${{ env.UPSTREAM_REPO }}" "${{ env.TARGET_BRANCH }}" - # 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 + git add -A + git commit -m "Updating ${{ github.event.repository.name }} with upstream changes" - name: Push changes to new branch - if: success() && env.SKIP_PR == 'false' + if: success() run: | git push origin "${{ env.BRANCH_NAME }}" - name: Create Pull Request - if: success() && env.SKIP_PR == 'false' + if: success() uses: peter-evans/create-pull-request@v7.0.5 with: token: ${{ steps.generate-rekku-token.outputs.token || secrets.GITHUB_TOKEN }}