Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Commit

Permalink
Update git configuration and use goprivate for private repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmello committed Apr 8, 2024
1 parent cdd2287 commit a9ea1c9
Showing 1 changed file with 37 additions and 7 deletions.
44 changes: 37 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
TD_QUEUE_ZONE: ${{ secrets.TD_QUEUE_ZONE }}
DUMP_QUEUE_NAME: ${{ secrets.DUMP_QUEUE_NAME }}
DUMP_QUEUE_ZONE: ${{ secrets.DUMP_QUEUE_ZONE }}
GOPRIVATE: github.com/spacemeshos/api-cve-fix,github.com/spacemeshos/go-spacemesh-cve-fix
# If was necessary the variable GOPRIVATE can be set on the repository settings :: Secrets and Variables > action > Variables : GOPRIVATE

# Trigger the workflow on all pull requests, and on push to specific branches
on:
Expand Down Expand Up @@ -68,7 +68,13 @@ jobs:
with:
ssh-key: ${{ secrets.GH_ACTION_PRIVATE_KEY }}
- name: Update git config
run: git config --global [email protected]:.insteadOf https://github.com/
run: git config --global --unset-all [email protected]:.insteadof
- uses: extractions/netrc@v1
with:
machine: github.com
username: ${{ secrets.GH_ACTION_TOKEN_USER }}
password: ${{ secrets.GH_ACTION_TOKEN }}
if: vars.GOPRIVATE
- name: set up go
uses: actions/setup-go@v5
with:
Expand All @@ -94,8 +100,14 @@ jobs:
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.GH_ACTION_PRIVATE_KEY }}
- name: Update git config
run: git config --global [email protected]:.insteadOf https://github.com/
- name: Update git config # Clean up the git config to avoid issues with the next step
run: git config --global --unset-all [email protected]:.insteadof
- uses: extractions/netrc@v1
with:
machine: github.com
username: ${{ secrets.GH_ACTION_TOKEN_USER }}
password: ${{ secrets.GH_ACTION_TOKEN }}
if: vars.GOPRIVATE
- name: set up go
uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -134,7 +146,13 @@ jobs:
with:
ssh-key: ${{ secrets.GH_ACTION_PRIVATE_KEY }}
- name: Update git config
run: git config --global [email protected]:.insteadOf https://github.com/
run: git config --global --unset-all [email protected]:.insteadof
- uses: extractions/netrc@v1
with:
machine: github.com
username: ${{ secrets.GH_ACTION_TOKEN_USER }}
password: ${{ secrets.GH_ACTION_TOKEN }}
if: vars.GOPRIVATE
- name: set up go
uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -175,7 +193,13 @@ jobs:
with:
ssh-key: ${{ secrets.GH_ACTION_PRIVATE_KEY }}
- name: Update git config
run: git config --global [email protected]:.insteadOf https://github.com/
run: git config --global --unset-all [email protected]:.insteadof
- uses: extractions/netrc@v1
with:
machine: github.com
username: ${{ secrets.GH_ACTION_TOKEN_USER }}
password: ${{ secrets.GH_ACTION_TOKEN }}
if: vars.GOPRIVATE
- name: set up go
uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -229,7 +253,13 @@ jobs:
lfs: true
ssh-key: ${{ secrets.GH_ACTION_PRIVATE_KEY }}
- name: Update git config
run: git config --global [email protected]:.insteadOf https://github.com/
run: git config --global --unset-all [email protected]:.insteadof
- uses: extractions/netrc@v1
with:
machine: github.com
username: ${{ secrets.GH_ACTION_TOKEN_USER }}
password: ${{ secrets.GH_ACTION_TOKEN }}
if: vars.GOPRIVATE
- name: set up go
uses: actions/setup-go@v5
with:
Expand Down

0 comments on commit a9ea1c9

Please sign in to comment.