Skip to content

[StepSecurity] Apply security best practices #29

[StepSecurity] Apply security best practices

[StepSecurity] Apply security best practices #29

Workflow file for this run

name: Pull Request
on:
pull_request:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ linux/amd64, linux/arm64 ]
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: audit
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: '>=1.21.0'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@18ce135bb5112fa8ce4ed6c17ab05699d7f3a5e0 # v3.11.0
- name: Go Format
run: make fmt && git diff --exit-code
- name: Go Vet
run: make vet
- name: Go Tidy
run: go mod tidy && git diff --exit-code
- name: Go Mod
run: go mod download
- name: Go Mod Verify
run: go mod verify
- name: Go Test
run: make test
- name: Build Docker
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
with:
push: false