jx/.gitea/workflows/lint.yaml

41 lines
1.1 KiB
YAML
Raw Normal View History

2024-03-27 17:48:07 +00:00
name: Lint
on:
- push
jobs:
lint:
name: golangci-lint
runs-on: ubuntu-latest
2024-05-25 21:32:40 +00:00
container:
env:
SSH_AUTH_SOCK: /tmp/ssh.sock
ENVIRONMENT: dev
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
- "/etc/gitconfig:/etc/gitconfig:ro"
- "/${{ env.SSH_AUTH_SOCK }}:/tmp/ssh.sock"
- "/${{ vars.GITEA_WORKSPACE }}:/go/src"
- "/${{ vars.BUILDER_VOLUME_HOME }}/.ssh/known_hosts:/root/.ssh/known_hosts"
- "/${{ vars.BUILDER_VOLUME_HOME }}/.gitconfig:/root/.gitconfig:ro"
- "/${{ vars.BUILDER_VOLUME_HOME }}/.git-credentials:/root/.git-credentials:ro"
- "/etc/ssl/certs:/etc/ssl/certs:ro"
options: --cpus 20
2024-03-27 17:48:07 +00:00
steps:
- uses: actions/setup-go@v4
with:
2024-05-25 20:24:28 +00:00
go-version: "1.22.1"
2024-03-27 17:48:07 +00:00
cache: false
- name: Check out code
uses: actions/checkout@v3
2024-05-25 20:55:35 +00:00
- run: cat ~/.gitconfig
- run: ls -al ~/.git*
2024-05-25 20:31:48 +00:00
- name: Get packages
run: go get ./...
2024-03-27 17:48:07 +00:00
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55