Skip to content

chore: update golangci-lint workflow to use Ubuntu 22.04 #689

chore: update golangci-lint workflow to use Ubuntu 22.04

chore: update golangci-lint workflow to use Ubuntu 22.04 #689

Workflow file for this run

name: golangci-lint
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
workflow_call:
permissions:
contents: read
#pull-requests: read
jobs:
wait-for-quiet-period:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Wait for quiet period
run: sleep 900 # Wait for 15 minutes
golangci:
needs: [wait-for-quiet-period]
name: lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- run: go version
- name: Install dependencies
run: make check-tensorflow
- name: Set environment variables for CGO
run: |
echo "CGO_ENABLED=1" >> $GITHUB_ENV
echo "CGO_CFLAGS=-I $HOME/src/tensorflow" >> $GITHUB_ENV
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.63