add dispatch init
command
#225
Workflow file for this run
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: build | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
GOPRIVATE: github.com/dispatchrun,buf.build/gen/go | |
GOVERSION: 1.22.0 | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: bufbuild/[email protected] | |
with: | |
buf_user: ${{ secrets.BUF_USER }} | |
buf_api_token: ${{ secrets.BUF_TOKEN }} | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GOVERSION }} | |
- run: git config --global url.https://${{ secrets.PRIVATE_REPO }}@github.com.insteadOf https://github.com | |
- run: go mod download | |
- uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.54.2 | |
args: --timeout 4m | |
# Disable caching as a workaround for https://github.com/golangci/golangci-lint-action/issues/135. | |
skip-pkg-cache: true | |
test: | |
runs-on: ${{ matrix.os }} | |
concurrency: | |
group: ${{ matrix.os }}-${{ github.workflow }}-${{ github.event.number || github.ref }} | |
cancel-in-progress: true | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: bufbuild/[email protected] | |
with: | |
buf_user: ${{ secrets.BUF_USER }} | |
buf_api_token: ${{ secrets.BUF_TOKEN }} | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GOVERSION }} | |
- run: git config --global url.https://${{ secrets.PRIVATE_REPO }}@github.com.insteadOf https://github.com | |
- run: go mod download | |
- run: make test-cover |