40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Lint
|
|
on:
|
|
- push
|
|
jobs:
|
|
lint:
|
|
name: golangci-lint
|
|
runs-on: ubuntu-latest
|
|
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"
|
|
- "/opt/gitea/act_runner/.ssh/known_hosts:/root/.ssh/known_hosts"
|
|
- "/opt/gitea/act_runner/.gitconfig:/root/.gitconfig:ro"
|
|
- "/opt/gitea/act_runner/.git-credentials:/root/.git-credentials:ro"
|
|
- "/etc/ssl/certs:/etc/ssl/certs:ro"
|
|
options: --cpus 20
|
|
steps:
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "1.22.1"
|
|
cache: false
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v3
|
|
|
|
- run: apt-get -y update && apt-get -y install libluajit-5.1-dev
|
|
- name: Get packages
|
|
run: go get ./...
|
|
|
|
- name: Lint
|
|
uses: golangci/golangci-lint-action@v3
|
|
with:
|
|
version: v1.55
|