sync-upstream: Pass token via checkout for git push operations
This commit is contained in:
5
.github/workflows/sync.yml
vendored
5
.github/workflows/sync.yml
vendored
@@ -23,6 +23,7 @@ jobs:
|
|||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
token: ${{ secrets.SYNC_PAT }}
|
||||||
|
|
||||||
- name: Configure Git
|
- name: Configure Git
|
||||||
run: |
|
run: |
|
||||||
@@ -65,8 +66,6 @@ jobs:
|
|||||||
- name: Generate PR metadata
|
- name: Generate PR metadata
|
||||||
id: branch_pr_metadata
|
id: branch_pr_metadata
|
||||||
if: steps.check_commits.outputs.skip == 'false'
|
if: steps.check_commits.outputs.skip == 'false'
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.SYNC_PAT }}
|
|
||||||
run: |
|
run: |
|
||||||
# Call the sync script to generate PR title and body
|
# Call the sync script to generate PR title and body
|
||||||
./contrib/sync-upstream.sh -b ${{ env.ORIGIN_BRANCH }} "$SYNC_BRANCH"
|
./contrib/sync-upstream.sh -b ${{ env.ORIGIN_BRANCH }} "$SYNC_BRANCH"
|
||||||
@@ -74,8 +73,6 @@ jobs:
|
|||||||
- name: Push a sync branch
|
- name: Push a sync branch
|
||||||
id: push_branch
|
id: push_branch
|
||||||
if: steps.check_commits.outputs.skip == 'false'
|
if: steps.check_commits.outputs.skip == 'false'
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.SYNC_PAT }}
|
|
||||||
run: |
|
run: |
|
||||||
echo "Creating sync branch: $SYNC_BRANCH"
|
echo "Creating sync branch: $SYNC_BRANCH"
|
||||||
git checkout upstream/${{ env.UPSTREAM_BRANCH }}
|
git checkout upstream/${{ env.UPSTREAM_BRANCH }}
|
||||||
|
|||||||
Reference in New Issue
Block a user