Update GHA golang version #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go-build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
GO_VER: "1.22" | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VER }} | |
- uses: actions/checkout@v5 | |
with: | |
fetch-depth: 0 | |
- name: Build | |
run: make build | |
lint: | |
name: Run golangci-lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VER }} | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Run golangci-lint | |
# You may pin to the exact commit or the version. | |
# uses: golangci/golangci-lint-action@04eca2038305127fb1e6683425b6864cd5612f2d | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
# version of golangci-lint to use in form of v1.2.3 | |
version: latest | |
# if set to true and the action runs on a pull request - the action outputs only newly found issues | |
only-new-issues: true | |
# golangci-lint command line arguments | |
#args: # optional, default is | |
# golangci-lint working directory, default is project root | |
#working-directory: # optional | |
# the token is used for fetching patch of a pull request to show only new issues | |
#github-token: # default is ${{ github.token }} |