Skip to content

Commit 2ccac94

Browse files
authored
Authenticate git push in autoroll (KhronosGroup#6790)
Setting persist-credentials to false broke git push in autoroll workflow. This is fixed by authenticate git push using GITHUB_TOKEN. Other changes were made to clean up some warnings. TAG=agy
1 parent 3058f80 commit 2ccac94

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/autoroll.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323

2424
# Checkout the depot tools they are needed by roll_deps.sh
2525
- name: Checkout depot tools
26-
run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
26+
run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $GITHUB_WORKSPACE/../depot_tools
2727

2828
- name: Update PATH
29-
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
29+
run: echo "$GITHUB_WORKSPACE/../depot_tools" >> $GITHUB_PATH
3030

3131
- name: Download dependencies
3232
run: python3 utils/git-sync-deps
@@ -49,11 +49,11 @@ jobs:
4949
- name: Push changes and create PR
5050
if: steps.update_dependencies.outputs.changed == 'true'
5151
run: |
52-
git push --force --set-upstream origin roll_deps
52+
git push --force https://x-access-token:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git roll_deps
5353
# Create a PR. If it aready exists, the command fails, so ignore the return code.
54-
gh pr create --base main -f || true
54+
gh pr create --head roll_deps --base main -f || true
5555
# Add the 'kokoro:run' label so that the kokoro tests will be run.
56-
gh pr edit --add-label 'kokoro:run'
57-
gh pr merge --auto --squash
56+
gh pr edit roll_deps --add-label 'kokoro:run'
57+
gh pr merge roll_deps --auto --squash
5858
env:
5959
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)