Skip to content

Develop

Develop #170

name: "Go Combined Analysis"
on:
pull_request:
branches:
- develop
- main
types:
- opened
- edited
- synchronize
- reopened
permissions:
id-token: write
contents: read
pull-requests: read
actions: read
security-events: write
jobs:
GoLangCI-Lint:
name: Run GoLangCI-Lint to SDK
runs-on: ubuntu-24.04
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.LERIAN_STUDIO_MIDAZ_PUSH_BOT_APP_ID }}
private-key: ${{ secrets.LERIAN_STUDIO_MIDAZ_PUSH_BOT_PRIVATE_KEY }}
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
id: import_gpg
with:
gpg_private_key: ${{ secrets.LERIAN_CI_CD_USER_GPG_KEY }}
passphrase: ${{ secrets.LERIAN_CI_CD_USER_GPG_KEY_PASSWORD }}
git_committer_name: ${{ secrets.LERIAN_CI_CD_USER_NAME }}
git_committer_email: ${{ secrets.LERIAN_CI_CD_USER_EMAIL }}
git_config_global: true
git_user_signingkey: true
git_commit_gpgsign: true
- uses: actions/checkout@v4
- name: GoLangCI-Lint
uses: reviewdog/action-golangci-lint@v2
with:
github_token: ${{ steps.app-token.outputs.token }}
go_version: '1.23'
tool_name: golint
level: error
fail_level: any
reporter: github-pr-review
filter_mode: diff_context
golangci_lint_version: v2.4.0
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ steps.app-token.outputs.token }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
GIT_AUTHOR_NAME: ${{ secrets.LERIAN_CI_CD_USER_NAME }}
GIT_AUTHOR_EMAIL: ${{ secrets.LERIAN_CI_CD_USER_EMAIL }}
GIT_COMMITTER_NAME: ${{ secrets.LERIAN_CI_CD_USER_NAME }}
GIT_COMMITTER_EMAIL: ${{ secrets.LERIAN_CI_CD_USER_EMAIL }}
GoSec:
name: Run GoSec to SDK
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: false
- name: Gosec Scanner
uses: securego/gosec@master
with:
args: ./...