Try to auth for push using HTTP header

This commit is contained in:
Gavin John 2025-02-27 22:37:34 -08:00
parent 0ed1a46744
commit 906d0e30b6

View file

@ -79,14 +79,9 @@ jobs:
- name: Rebase and Push
run: |
source ./ci/lib/setup-git.sh
git -C $GITHUB_WORKSPACE/nur-combined remote set-url origin https://${API_TOKEN_GITHUB:-git}@github.com/nix-community/nur-combined.git
git -C $GITHUB_WORKSPACE/nur-combined fetch origin master
git -C $GITHUB_WORKSPACE/nur-combined pull --rebase origin master
git -C $GITHUB_WORKSPACE/nur-combined push origin master
env:
GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }}
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
git -C $GITHUB_WORKSPACE/nur-combined -c http.extraheader="Authorization: Bearer ${{ steps.get_workflow_token.outputs.token }}" push origin master
update_search:
runs-on: ubuntu-latest
@ -126,10 +121,6 @@ jobs:
- name: Rebase and Push
run: |
source ./ci/lib/setup-git.sh
git -C $GITHUB_WORKSPACE/nur-search remote set-url origin https://${API_TOKEN_GITHUB:-git}@github.com/nix-community/nur-search.git
git -C $GITHUB_WORKSPACE/nur-search fetch origin master
git -C $GITHUB_WORKSPACE/nur-search pull --rebase origin master
git -C $GITHUB_WORKSPACE/nur-search push origin master
env:
GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }}
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
git -C $GITHUB_WORKSPACE/nur-search -c http.extraheader="Authorization: Bearer ${{ steps.get_workflow_token.outputs.token }}" push origin master