Skip to content

Ensure that upload is not going to be empty #57

Ensure that upload is not going to be empty

Ensure that upload is not going to be empty #57

Workflow file for this run

name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
# renovate: datasource=go depName=mvdan.cc/gofumpt
GOFUMPT_VERSION: v0.3.1
# renovate: datasource=go depName=github.com/golangci/golangci-lint
GOLANGCI_LINT_VERSION: v1.53.3
jobs:
skip-check:
name: Skip check
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip-check.outputs.should_skip }}
permissions:
actions: write
contents: read
steps:
- id: skip-check
uses: fkirc/skip-duplicate-actions@9d116fa7e55f295019cfab7e3ab72b478bcf7fdd # tag=v4.0.0
with:
do_not_skip: '["schedule", "workflow_dispatch"]'
paths: |-
[
"**.go",
".github/workflows/build.yml",
"Makefile",
"go.mod",
"go.sum"
]
skip_after_successful_duplicate: false
go-build-test:
name: Go Build
runs-on: ubuntu-latest
needs: skip-check
if: ${{ needs.skip-check.outputs.should_skip != 'true' }}
steps:
- name: Check out the code
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
- name: Set up Go
uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a # tag=v3.2.1
with:
go-version-file: 'go.mod'
check-latest: true
cache: true
- name: Build
run: make build
- name: Test
run: |
make test
- name: Format
run: |
make format
git diff --exit-code
- name: Vet
run: make vet
- name: Lint
uses: golangci/golangci-lint-action@0ad9a0988b3973e851ab0a07adf248ec2e100376 # tag=v3.3.1
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}