Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Update images digests #254

Update images digests

Update images digests #254

Workflow file for this run

# Copyright 2022 Chainguard, Inc.
# SPDX-License-Identifier: Apache-2.0
name: Code Style
on:
pull_request:
branches: [ 'main', 'release-*' ]
push:
branches: [ 'main', 'release-*' ]
jobs:
gofmt:
name: check gofmt
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: './go.mod'
check-latest: true
- uses: chainguard-dev/actions/gofmt@main
with:
args: -s
goimports:
name: check goimports
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: './go.mod'
check-latest: true
- uses: chainguard-dev/actions/goimports@main
golangci-lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: './go.mod'
check-latest: true
# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds
- uses: actions/cache@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0
with:
# In order:
# * Module download cache
# * Build cache (Linux)
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: ./hack/verify-golangci-lint.sh
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: './go.mod'
check-latest: true
- uses: chainguard-dev/actions/trailing-space@main
if: ${{ always() }}
- uses: chainguard-dev/actions/eof-newline@main
if: ${{ always() }}
- uses: reviewdog/action-tflint@master
if: ${{ always() }}
with:
github_token: ${{ secrets.github_token }}
fail_on_error: true
- uses: reviewdog/action-misspell@ef8b22c1cca06c8d306fc6be302c3dab0f6ca12f # v1.23.0
if: ${{ always() }}
with:
github_token: ${{ secrets.github_token }}
fail_on_error: true
locale: "US"
exclude: |
**/go.sum
**/third_party/**
./*.yml
- uses: get-woke/woke-action-reviewdog@d71fd0115146a01c3181439ce714e21a69d75e31 # v0
if: ${{ always() }}
with:
github-token: ${{ secrets.github_token }}
reporter: github-pr-check
level: error
fail-on-error: true