diff --git a/.github/workflows/go-build-and-release.yml b/.github/workflows/go-build-and-release.yml index 73d711e..a9dda25 100644 --- a/.github/workflows/go-build-and-release.yml +++ b/.github/workflows/go-build-and-release.yml @@ -27,6 +27,13 @@ jobs: with: # Allow goreleaser to access older tag information. fetch-depth: 0 + + - name: Set up private repo access for go get + run: | + git config --global url."https://$GITHUB_TOKEN:x-oauth-basic@github.com/".insteadOf "https://github.com/" + env: + GITHUB_TOKEN: ${{ secrets.V2BUILDTOKEN}} + - uses: keyfactor/setup-go@v5.0.1 with: go-version-file: 'go.mod' @@ -52,7 +59,7 @@ jobs: args: ${{ env.GO_ARGS }} env: # GitHub sets the GITHUB_TOKEN secret automatically. - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.V2BUILDTOKEN}} PAT_TOKEN: ${{ secrets.GITHUB_TOKEN }} GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} GPG_TTY: $(tty) diff --git a/.github/workflows/starter.yml b/.github/workflows/starter.yml index 23622a4..ef6a11d 100644 --- a/.github/workflows/starter.yml +++ b/.github/workflows/starter.yml @@ -100,7 +100,7 @@ jobs: call-go-build-and-release-workflow: needs: [call-get-primary-language, call-assign-from-json-workflow, call-create-github-release-workflow,call-goreleaser-exists] if: needs.call-get-primary-language.outputs.primary_language == 'Go' && needs.call-goreleaser-exists.outputs.goreleaser-exists == 'true' - uses: keyfactor/actions/.github/workflows/go-build-and-release.yml@v3 + uses: keyfactor/actions/.github/workflows/go-build-and-release.yml@go_build_private_repo_access with: release_version: ${{ needs.call-create-github-release-workflow.outputs.release_version }} secrets: diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..3be47a6 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,8 @@ + +# Changelog + +## v3.1.3 + +### Fixes + +- Configure `go` build process to use build token for private repository access. \ No newline at end of file