From 5a7a915ed66ba103af30277e5ab05957975d50c9 Mon Sep 17 00:00:00 2001 From: wj00037 <140682082+wj00037@users.noreply.github.com> Date: Sat, 14 Sep 2024 16:28:49 +0800 Subject: [PATCH] Update lint.yml --- .github/workflows/lint.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9a36688..84ddaaf 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,6 +23,11 @@ jobs: runs-on: [self-hosted, Linux] steps: - uses: actions/checkout@v4 + - name: config github + env: + TOKEN: ${{ secrets.ACCESS_TOKEN }} + USER: ${{ secrets.USER_NAME }} + run: echo "machine github.com login $USER password $TOKEN" > ~/.netrc - name: golangci-lint uses: golangci/golangci-lint-action@master with: @@ -38,7 +43,11 @@ jobs: - name: Run Gosec Security Scanner uses: securego/gosec@master + env: + GITHUB_AUTHENTICATION_TOKEN: ${{ secrets.ACCESS_TOKEN }} with: args: -exclude-dir api -exclude-dir tests ./... - name: Unit tests - run: go test -race -count=1 -v ./... \ No newline at end of file + run: go test -race -count=1 -v ./... + - name: cleanup + run: rm -f ~/.netrc