Cleanup GitHub actions
This commit is contained in:
parent
dd86250335
commit
c358848ed5
4 changed files with 31 additions and 50 deletions
27
.github/workflows/go.yml
vendored
27
.github/workflows/go.yml
vendored
|
@ -8,28 +8,49 @@ on:
|
||||||
- main
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
permissions:
|
||||||
|
contents: write
|
||||||
|
issues: write
|
||||||
|
packages: write
|
||||||
|
pull-requests: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go 1.17
|
- name: Set up Go 1.17
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: '^1.17'
|
go-version: '^1.17'
|
||||||
id: go
|
id: go
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
lfs: true
|
lfs: true
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install Task
|
- name: Install Task
|
||||||
uses: arduino/setup-task@v1
|
uses: arduino/setup-task@v1
|
||||||
|
|
||||||
|
- name: Download assets
|
||||||
|
run: task download-assets
|
||||||
|
|
||||||
|
- name: golangci-lint
|
||||||
|
uses: golangci/golangci-lint-action@v3
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
|
||||||
- name: Build & test
|
- name: Build & test
|
||||||
run: task download-assets test
|
run: task test
|
||||||
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v2
|
uses: goreleaser/goreleaser-action@v2
|
||||||
|
|
46
.github/workflows/golangci-lint.yml
vendored
46
.github/workflows/golangci-lint.yml
vendored
|
@ -1,46 +0,0 @@
|
||||||
name: golangci-lint
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- v*
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: read
|
|
||||||
jobs:
|
|
||||||
golangci:
|
|
||||||
name: lint
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Set up Go 1.17
|
|
||||||
uses: actions/setup-go@v2
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Install Task
|
|
||||||
uses: arduino/setup-task@v1
|
|
||||||
- name: Download assets
|
|
||||||
run: task download-assets
|
|
||||||
- name: golangci-lint
|
|
||||||
uses: golangci/golangci-lint-action@v3
|
|
||||||
with:
|
|
||||||
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
|
|
||||||
version: latest
|
|
||||||
|
|
||||||
# Optional: working directory, useful for monorepos
|
|
||||||
# working-directory: somedir
|
|
||||||
|
|
||||||
# Optional: golangci-lint command line arguments.
|
|
||||||
# args: --issues-exit-code=0
|
|
||||||
|
|
||||||
# Optional: show only new issues if it's a pull request. The default value is `false`.
|
|
||||||
# only-new-issues: true
|
|
||||||
|
|
||||||
# Optional: if set to true then the action will use pre-installed Go.
|
|
||||||
# skip-go-installation: true
|
|
||||||
|
|
||||||
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
|
|
||||||
# skip-pkg-cache: true
|
|
||||||
|
|
||||||
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
|
|
||||||
# skip-build-cache: true
|
|
|
@ -21,6 +21,12 @@ builds:
|
||||||
goarch: arm
|
goarch: arm
|
||||||
goarm: '7'
|
goarm: '7'
|
||||||
|
|
||||||
|
release:
|
||||||
|
github:
|
||||||
|
owner: baez90
|
||||||
|
name: goveal
|
||||||
|
mode: replace
|
||||||
|
|
||||||
dockers:
|
dockers:
|
||||||
- id: goveal
|
- id: goveal
|
||||||
goos: linux
|
goos: linux
|
||||||
|
|
|
@ -40,7 +40,7 @@ tasks:
|
||||||
- go.sum
|
- go.sum
|
||||||
cmds:
|
cmds:
|
||||||
- go mod download
|
- go mod download
|
||||||
- go mod tidy
|
- go mod tidy -compat=1.17
|
||||||
|
|
||||||
test:
|
test:
|
||||||
sources:
|
sources:
|
||||||
|
|
Loading…
Reference in a new issue