Skip to content

Merge pull request #266 from fluxcd/dependabot/github_actions/ci-0c39… #881

Merge pull request #266 from fluxcd/dependabot/github_actions/ci-0c39…

Merge pull request #266 from fluxcd/dependabot/github_actions/ci-0c39… #881

Workflow file for this run

name: build
on:
pull_request:
push:
branches:
- main
jobs:
vet:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Restore Go cache
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: 1.21.x
- name: Run vet
run: make tidy fmt vet
- name: Check if working tree is dirty
run: |
if [[ $(git diff --stat) != '' ]]; then
echo "run 'make tidy fmt vet' and commit changes"
exit 1
fi