diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 87592e0..ae207da 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,41 +1,25 @@ name: Lint -on: pull_request +on: + pull_request: + workflow_dispatch: jobs: lint-commits: - name: Lint commits runs-on: ubuntu-latest steps: - - name: Check out code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ github.event.pull_request.head.sha }} - - uses: actions/cache@v4 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - run: go mod download + - uses: actions/checkout@v4 - name: Run commitsar uses: aevea/commitsar@v0.20.2 lint-code: - name: Lint code runs-on: ubuntu-latest steps: - - name: Check out code - uses: actions/checkout@v4 - - name: Run golangci-lint - uses: golangci/golangci-lint-action@v6.1.1 + - uses: actions/checkout@v4 + - uses: golangci/golangci-lint-action@v6.1.1 lint-language: - name: Lint language runs-on: ubuntu-latest steps: - - name: Check out code - uses: actions/checkout@v4 - - name: Run woke - uses: get-woke/woke-action@v0 + - uses: actions/checkout@v4 + - uses: get-woke/woke-action@v0 with: fail-on-error: true