Skip to content

Commit

Permalink
Check if there are new commits to sync fix 11
Browse files Browse the repository at this point in the history
  • Loading branch information
semeniak97mf committed Aug 23, 2024
1 parent 2182e0c commit 67a3345
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/sync-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: upstream
token: ${{ secrets.ACCESS_TOKEN }}
token: ${{ github.token }}

- name: Sync upstream changes
id: sync
Expand All @@ -57,14 +57,16 @@ jobs:
echo "This branch is up to date"
echo "new_commits=false" >> $GITHUB_ENV
fi
- name: Push changes to origin
if: env.new_commits == 'true'
env:
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
GH_TOKEN: ${{ github.token }}
run: |
git pull upstream --ff-only
echo ${{ github.repository }}
git push https://${GH_TOKEN}@github.com/${{ github.repository }} upstream
git push https://${GITHUB_ACTOR}:${GH_TOKEN}@github.com/${{ github.repository }} upstream
- name: Push changes to origin
if: env.new_commits == 'true'
id: check_pr_exists
Expand All @@ -78,6 +80,7 @@ jobs:
else
echo "Pull Request not found. It will be created"
fi
- name: Create Pull Request
if: env.new_commits == 'true' && env.pr_count == '0'
env:
Expand Down

0 comments on commit 67a3345

Please sign in to comment.