chore: add a common execution id into CI events #307
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
env: | |
GOPRIVATE: "github.com/speakeasy-api" | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: "read" | |
id-token: "write" | |
actions: "read" | |
steps: | |
- name: Setup environment | |
run: |- | |
echo ("GOPRIVATE=github.com/speakeasy-api") >> $env:GITHUB_ENV | |
- name: Configure git for private modules | |
env: | |
GIT_AUTH_TOKEN: ${{ secrets.BOT_REPO_TOKEN }} | |
run: git config --global url."https://speakeasybot:${GIT_AUTH_TOKEN}@github.com".insteadOf "https://github.com" | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ^1.21 | |
- name: Configure git for private modules | |
env: | |
GIT_AUTH_TOKEN: ${{ secrets.BOT_REPO_TOKEN }} | |
run: git config --global url."https://speakeasybot:${GIT_AUTH_TOKEN}@github.com".insteadOf "https://github.com" | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Test | |
run: go test -v ./... |