Skip to content

Disallow internet egress by default & reroute accounts.google.com -> private.googleapis.com #802

Disallow internet egress by default & reroute accounts.google.com -> private.googleapis.com

Disallow internet egress by default & reroute accounts.google.com -> private.googleapis.com #802

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: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- name: Check out code
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: './go.mod'
check-latest: true
- uses: chainguard-dev/actions/gofmt@538d1927b846546b620784754c33e2a1db86e217 # main
with:
args: -s
goimports:
name: check goimports
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- name: Check out code
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: './go.mod'
check-latest: true
- uses: chainguard-dev/actions/goimports@538d1927b846546b620784754c33e2a1db86e217 # main
golangci-lint:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: golangci-lint
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: './go.mod'
check-latest: true
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.55
args: --timeout=5m
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- name: Check out code
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: './go.mod'
check-latest: true
- uses: chainguard-dev/actions/trailing-space@538d1927b846546b620784754c33e2a1db86e217 # main
if: ${{ always() }}
- uses: chainguard-dev/actions/eof-newline@538d1927b846546b620784754c33e2a1db86e217 # main
if: ${{ always() }}
- uses: reviewdog/action-tflint@2fa60920754fb622564b410ad421ab596adb628a # master
if: ${{ always() }}
with:
github_token: ${{ secrets.github_token }}
fail_on_error: true
- uses: reviewdog/action-misspell@5bd7be2fc7ae56a517184f5c4bbcf2fd7afe3927 # v1.17.0
if: ${{ always() }}
with:
github_token: ${{ secrets.github_token }}
fail_on_error: true
locale: "US"
exclude: |
**/go.sum
**/third_party/**
./*.yml
ignore: cancelled
- 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