Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
Signed-off-by: Eoghan Russell <[email protected]>
  • Loading branch information
Eoghan Russell committed Feb 27, 2024
1 parent 0cce89f commit c734e73
Showing 1 changed file with 7 additions and 31 deletions.
38 changes: 7 additions & 31 deletions .github/workflows/static-scan.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,32 @@
name: Go-static-analysis
on: [push, pull_request]

permissions:
contents: read

jobs:

golangci:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit

- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
uses: actions/setup-go@v4
with:
go-version: 1.20.1

- 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.52.2
args: --timeout=20m
go-version: "1.20"
- uses: actions/checkout@v3
- name: run make lint
run: make lint

shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.5.3
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # main
uses: ludeeus/action-shellcheck@master

hadolint:
runs-on: ubuntu-latest
name: Hadolint
env:
HADOLINT_RECURSIVE: "true"
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
name: Run Hadolint
Expand Down

0 comments on commit c734e73

Please sign in to comment.