Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): unify CI workflows #172

Merged
merged 11 commits into from
Sep 15, 2023
50 changes: 40 additions & 10 deletions .github/workflows/golangci-lint.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,54 @@
name: Lint
name: CI

on:
push:
tags:
- v*
branches:
- master
- main
- main
- master
tags:
- v*

pull_request:

permissions:
contents: read

jobs:
golangci:
name: lint

build:
name: Build
runs-on: ubuntu-latest
steps:
-
name: Check out code
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
-
name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: 'go.mod'
id: go
-
name: Build
run: go build -v .
-
name: Test
run: go test -v ./...

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
-
name: Checkout code
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Set up Go
-
name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: 'go.mod'
- name: golangci-lint
-
name: golangci-lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ name: Docker

on:
push:
# Publish `master` as Docker `latest` image.
branches:
- master
- main
- master

# Publish `v1.2.3` tags as releases.
tags:
- v*
- v*
pull_request:
branches: [ master ]

env:
REGISTRY: ghcr.io
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/go.yml

This file was deleted.