mirror of
https://github.com/hashicorp/packer.git
synced 2026-04-26 08:37:23 -04:00
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 4. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
YAML
#
|
|
# This GitHub action runs basic linting checks for Packer.
|
|
#
|
|
|
|
name: "Go Validate"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
check-mod-tidy:
|
|
runs-on: ubuntu-latest
|
|
name: Go Mod Tidy
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.18'
|
|
- run: go mod tidy
|
|
check-lint:
|
|
runs-on: ubuntu-latest
|
|
name: Lint
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.18'
|
|
- run: echo "$GITHUB_SHA"
|
|
- run: git fetch --all
|
|
- run: echo $(git merge-base origin/main $GITHUB_SHA)
|
|
- run: make ci-lint
|
|
check-fmt:
|
|
runs-on: ubuntu-latest
|
|
name: Fmt check
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.18'
|
|
- run: make fmt-check
|
|
check-generate:
|
|
runs-on: ubuntu-latest
|
|
name: Generate check
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.18'
|
|
- run: make generate-check
|