Skip to content

Commit

Permalink
Set git credentials by git-config instead of depending on actions/che…
Browse files Browse the repository at this point in the history
…ckout

Because swift repository is now checkout under ../build/Distribution by
gh-distribute-toolchain and the path can be changed in the future, we
shouldn't assume the path of swift repository. actions/checkout strategy
to pass credentials to git depends on the path, so we manually set the
credentials by ourselves.
The `extraheader` strategy somehow doesn't work now, so we use basic
authentication embedded in the url.
  • Loading branch information
kateinoigakukun committed Jul 2, 2023
1 parent 00ae039 commit 0895044
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/distribute-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@ jobs:
with:
repository: swiftwasm/swiftwasm-build
path: swiftwasm-build
# Checkout swiftwasm/swift also to push tags
- uses: actions/checkout@v3
with:
repository: swiftwasm/swift
path: swift
- run: git -C swift remote rename origin swiftwasm
- run: git -C swift remote add upstream https://github.com/apple/swift.git
- name: git config for pushing tags
run: git config --global url."https://x-access-token:[email protected]/swiftwasm/swift.git".insteadOf "[email protected]:swiftwasm/swift.git"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup environment variables
run: |
if [[ -n "${{ github.event.inputs.display-name }}" ]]; then
Expand Down

0 comments on commit 0895044

Please sign in to comment.