mirror of
https://github.com/Fishwaldo/go-logadapter.git
synced 2025-07-23 21:28:54 +00:00
Update build.yml
This commit is contained in:
parent
cae24add56
commit
6be98f8be9
1 changed files with 23 additions and 26 deletions
49
.github/workflows/build.yml
vendored
49
.github/workflows/build.yml
vendored
|
@ -26,9 +26,28 @@ jobs:
|
|||
- name: Run tests
|
||||
run: go test -v -race ./...
|
||||
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: go
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
|
||||
codecov:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
needs: [ test, analyze ]
|
||||
steps:
|
||||
- name: Install Go
|
||||
if: success()
|
||||
|
@ -45,7 +64,7 @@ jobs:
|
|||
lint:
|
||||
name: Lint project using GolangCI Lint
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
needs: [ test, analyze ]
|
||||
steps:
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v1
|
||||
|
@ -56,32 +75,9 @@ jobs:
|
|||
only-new-issues: true
|
||||
args: --issues-exit-code=0
|
||||
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'go' ]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
|
||||
goreadme:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [codecov, lint, analyze]
|
||||
needs: [codecov, lint]
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
@ -94,6 +90,7 @@ jobs:
|
|||
title: 'Go-LogAdapter'
|
||||
# Optional: Token allows goreadme to comment the PR with diff preview.
|
||||
github-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
|
||||
release:
|
||||
#if: startsWith(github.ref, 'refs/tags/')
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue