Skip to content

build(deps): Bump docker/build-push-action from 4 to 5 #657

build(deps): Bump docker/build-push-action from 4 to 5

build(deps): Bump docker/build-push-action from 4 to 5 #657

Workflow file for this run

name: CI
on:
push:
branches:
- main
paths:
- ".github/workflows/**"
- "**.go"
- "Makefile"
- "go.**"
pull_request:
paths:
- ".github/workflows/**"
- "**.go"
- "Makefile"
- "go.**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.18
- uses: actions/checkout@v3
- name: Cache Go modules
uses: actions/cache@preview
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2
- run: echo "${HOME}/.local/bin" >> $GITHUB_PATH
- name: Add license
run: |
make addlicense && git add client api pkg cmd &&
git diff --cached --exit-code || (echo 'Please run "make addlicense" to verify license' && exit 1);
- run: go mod tidy
- name: Generate API documentation
run: |
make swag && git add pkg &&
git diff --cached --exit-code || (echo 'Please run "make swag" to verify api doc' && exit 1);
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
# Ref https://github.com/golangci/golangci-lint-action/issues/244
skip-pkg-cache: true
args: --timeout=3m
build:
name: build
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Cache Go modules
uses: actions/cache@preview
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- run: go mod tidy
- name: Generate API documentation
run: make swag
- name: Build
run: make
test:
name: test
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Cache Go modules
uses: actions/cache@preview
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- run: go mod tidy
- name: Generate API documentation
run: make swag
- name: test
run: make test