Update CI
Make use of the new -merge feature
@@ -19,9 +19,38 @@ jobs:
go-version: ${{ matrix.go }}
- run: "go test ./..."
- run: "go vet ./..."
- - uses: dominikh/staticcheck-action@v1.0.0
+ - uses: dominikh/staticcheck-action@9f77055cca7bfaafb836cbd6720865187f5fbf51
with:
- version: "2022.1"
+ version: "3d6c86f0908ab82d6ff280219e2968ee65f83b2e"
min-go-version: "1.17"
install-go: false
cache-key: ${{ matrix.go }}
+ output-format: binary
+ output-file: "./staticcheck.bin"
+ - uses: actions/upload-artifact@v3
+ with:
+ name: "staticcheck-${{ github.sha }}-${{ matrix.go }}-${{ matrix.os }}.bin"
+ path: "./staticcheck.bin"
+ retention-days: 1
+ if-no-files-found: warn
+ output:
+ name: "Output Staticcheck findings"
+ needs: ci
+ runs-on: "ubuntu-latest"
+ steps:
+ - uses: WillAbides/setup-go-faster@v1.7.0
+ with:
+ go-version: "1.18.x"
+ # this downloads all artifacts of the current workflow into the current working directory, creating one directory per artifact
+ - uses: actions/download-artifact@v3
+ - id: glob
+ run: |
+ # We replace newliens with %0A, which GitHub apparently magically turns back into newlines
+ out=$(ls -1 ./staticcheck-*.bin/*.bin)
+ echo "::set-output name=files::${out//$'\n'/%0A}"
+ - uses: dominikh/staticcheck-action@9f77055cca7bfaafb836cbd6720865187f5fbf51
+ with:
+ version: "3d6c86f0908ab82d6ff280219e2968ee65f83b2e"
+ min-go-version: "1.17"
+ install-go: false
+ merge-files: ${{ steps.glob.outputs.files }}
