Skip to content

Update actions/checkout action to v4.1.1 - autoclosed #294

Update actions/checkout action to v4.1.1 - autoclosed

Update actions/checkout action to v4.1.1 - autoclosed #294

Workflow file for this run

name: build
on:
pull_request:
jobs:
version:
runs-on: ubuntu-latest
if: startsWith(github.head_ref, 'renovate') == false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Detect Version for Docker
id: docker-version
run: echo "VERSION=$(SEP="-" scripts/version)" >> $GITHUB_OUTPUT
- name: Detect Version
id: version
run: echo "VERSION=$(scripts/version)" >> $GITHUB_OUTPUT
outputs:
docker-version: ${{ steps.docker-version.outputs.VERSION }}
version: ${{ steps.version.outputs.VERSION }}
build:
runs-on: ubuntu-latest
needs:
- version
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.21'
check-latest: true # https://github.com/actions/setup-go#check-latest-version
cache: true # https://github.com/actions/setup-go#caching-dependency-files-and-build-outputs
- name: Build
run: go build -race ./...
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
install-only: true
- name: Snapshot
run: make snapshot
env:
GORELEASER_CURRENT_TAG: ${{ needs.version.outputs.docker-version }}
- name: Grype scan
id: scan
uses: anchore/scan-action@v3
with:
path: "."
fail-build: true
severity-cutoff: negligible
output-format: sarif
- name: Upload SARIF report
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.scan.outputs.sarif }}