2021-04-30 16:09:41 +00:00
|
|
|
name: Builds
|
2021-04-30 12:27:45 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2022-11-02 10:10:45 +00:00
|
|
|
- 'support/*'
|
2021-04-30 12:27:45 +00:00
|
|
|
types: [opened, synchronize]
|
|
|
|
paths-ignore:
|
|
|
|
- '**/*.md'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build_cli:
|
|
|
|
name: Build CLI
|
2021-04-30 16:14:12 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2021-04-30 12:27:45 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Setup Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2022-08-30 12:58:31 +00:00
|
|
|
go-version: 1.19
|
2021-04-30 12:27:45 +00:00
|
|
|
|
|
|
|
- name: Restore Go modules from cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: /home/runner/go/pkg/mod
|
|
|
|
key: deps-${{ hashFiles('go.sum') }}
|
|
|
|
|
|
|
|
- name: Update Go modules
|
|
|
|
run: make dep
|
|
|
|
|
|
|
|
- name: Build CLI
|
|
|
|
run: make
|
|
|
|
|
2022-09-30 13:41:24 +00:00
|
|
|
- name: Check version
|
|
|
|
run: if [[ $(make version) == *"dirty"* ]]; then exit 1; fi
|
|
|
|
|
2021-04-30 12:27:45 +00:00
|
|
|
build_image:
|
|
|
|
needs: build_cli
|
|
|
|
name: Build Docker image
|
2021-04-30 16:14:12 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2021-04-30 12:27:45 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2022-08-30 12:58:31 +00:00
|
|
|
go-version: 1.19
|
2021-04-30 12:27:45 +00:00
|
|
|
|
|
|
|
- name: Restore Go modules from cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: /home/runner/go/pkg/mod
|
|
|
|
key: deps-${{ hashFiles('go.sum') }}
|
|
|
|
|
|
|
|
- name: Update Go modules
|
|
|
|
run: make dep
|
|
|
|
|
|
|
|
- name: Build Docker image
|
|
|
|
run: make image
|