mirror of
https://github.com/gravitational/teleport.git
synced 2026-11-02 14:59:53 +08:00
Without this build step when the root go.mod is changed it's possible to merge a change that will result in api dependencies being out of sync.
46 lines
914 B
YAML
46 lines
914 B
YAML
name: Build API Module
|
|
run-name: Build API Module
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- .github/workflows/build-api.yaml
|
|
- 'api/**/*.go'
|
|
- 'api/go.mod'
|
|
- 'api/go.sum'
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
merge_group:
|
|
paths:
|
|
- .github/workflows/build-api.yaml
|
|
- 'api/**/*.go'
|
|
- 'api/go.mod'
|
|
- 'api/go.sum'
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
|
|
jobs:
|
|
build:
|
|
name: Build API
|
|
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout Teleport
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
# use the version declared in API's go.mod
|
|
go-version-file: api/go.mod
|
|
|
|
- name: Init workspace
|
|
run: go work init . ./api/
|
|
|
|
- name: Build
|
|
run: go build ./api/...
|