Skip to content

Commit 1adb261

Browse files
committed
Update CI
Make use of the new -merge feature (cherry picked from commit 59d7a28)
1 parent 0e678cb commit 1adb261

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

.github/workflows/ci.yml

+32-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,38 @@ jobs:
1919
go-version: ${{ matrix.go }}
2020
- run: "go test ./..."
2121
- run: "go vet ./..."
22-
- uses: dominikh/staticcheck-action@v1.0.0
22+
- uses: dominikh/staticcheck-action@9f77055cca7bfaafb836cbd6720865187f5fbf51
2323
with:
24-
version: 274e0ee95850bc820301bfe5961eed9ebc8cb9e1
25-
min-go-version: "1.16"
24+
version: "3d6c86f0908ab82d6ff280219e2968ee65f83b2e"
25+
min-go-version: "1.17"
2626
install-go: false
2727
cache-key: ${{ matrix.go }}
28+
output-format: binary
29+
output-file: "./staticcheck.bin"
30+
- uses: actions/upload-artifact@v3
31+
with:
32+
name: "staticcheck-${{ github.sha }}-${{ matrix.go }}-${{ matrix.os }}.bin"
33+
path: "./staticcheck.bin"
34+
retention-days: 1
35+
if-no-files-found: warn
36+
output:
37+
name: "Output Staticcheck findings"
38+
needs: ci
39+
runs-on: "ubuntu-latest"
40+
steps:
41+
- uses: WillAbides/[email protected]
42+
with:
43+
go-version: "1.18.x"
44+
# this downloads all artifacts of the current workflow into the current working directory, creating one directory per artifact
45+
- uses: actions/download-artifact@v3
46+
- id: glob
47+
run: |
48+
# We replace newliens with %0A, which GitHub apparently magically turns back into newlines
49+
out=$(ls -1 ./staticcheck-*.bin/*.bin)
50+
echo "::set-output name=files::${out//$'\n'/%0A}"
51+
- uses: dominikh/staticcheck-action@9f77055cca7bfaafb836cbd6720865187f5fbf51
52+
with:
53+
version: "3d6c86f0908ab82d6ff280219e2968ee65f83b2e"
54+
min-go-version: "1.17"
55+
install-go: false
56+
merge-files: ${{ steps.glob.outputs.files }}

0 commit comments

Comments
 (0)