Skip to content

Apply GitHub workflow changes #88

Apply GitHub workflow changes

Apply GitHub workflow changes #88

name: Essential checkers and linters
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
checkers-and-linters:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
# Secrets are not available on pull requests.
- name: Login to Docker Hub
if: github.ref == 'refs/heads/main'
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
username: ${{ secrets.RO_DOCKERHUB_USER }}
password: ${{ secrets.RO_DOCKERHUB_TOKEN }}
- name: Install cookie
run: scripts/gogetcookie.sh
- name: Run checkers
run: |
make depscheck
make fmtcheck
make test-compile
make vet
- name: Run linters
run: |
make docs-lint
make tests-lint