add disable/enable workflow endpoints #53
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-go-libs | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
paths: ['go-libs/**'] | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: write | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21 | |
- name: Install Tools | |
run: go install gotest.tools/gotestsum@latest | |
- run: make test | |
working-directory: go-libs | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21.0 | |
- name: Install goimports | |
run: go install golang.org/x/tools/cmd/goimports@latest | |
- run: make fmt | |
working-directory: go-libs | |
- run: go mod tidy | |
working-directory: go-libs | |
- name: Fail on differences | |
run: | | |
# Exit with status code 1 if there are differences (i.e. unformatted files) | |
git diff --exit-code |