Skip to content

ci-go-lint

ci-go-lint #7

Workflow file for this run

name: ci-go-lint
on:
workflow_run:
workflows: ["ci-security-scanner-checks"]
types:
- completed
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "0 0 * * *"
jobs:
go-lint:
if: github.event.pull_request.draft == false
name: lint
runs-on: ubuntu-20.04
steps:
- name: Fail if Previous workflow failed
if: ${{ github.event.workflow_run.conclusion != 'success' }}
run: |
echo "Security Scan failed. Failing CI pipeline."
exit 1
- name: Checkout Code
uses: actions/checkout@v4
- name: Get Go Version
run: |
#!/bin/bash
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: golang-lint
env:
GOGC: 10
uses: golangci/golangci-lint-action@v6
with:
version: latest
only-new-issues: true
args: --timeout=10m