Files
teleport/.github/workflows/build-api.yaml
T
Mike Jensen 7ee72cd194 Build API on root go.mod changes (#23170)
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.
2023-03-16 13:40:48 +00:00

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/...