|
5 | 5 | branches: [main, master] |
6 | 6 | pull_request: |
7 | 7 |
|
8 | | -permissions: |
9 | | - contents: read |
| 8 | +permissions: {} |
10 | 9 |
|
11 | 10 | jobs: |
12 | 11 | test: |
13 | 12 | runs-on: ubuntu-latest |
| 13 | + permissions: |
| 14 | + contents: read |
14 | 15 | steps: |
15 | | - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
16 | | - - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 |
| 16 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 17 | + with: |
| 18 | + persist-credentials: false |
| 19 | + - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 |
17 | 20 | with: |
18 | 21 | go-version-file: go.mod |
19 | 22 | - run: make test |
20 | 23 |
|
21 | 24 | vet: |
22 | 25 | runs-on: ubuntu-latest |
| 26 | + permissions: |
| 27 | + contents: read |
23 | 28 | steps: |
24 | | - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
25 | | - - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 |
| 29 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 30 | + with: |
| 31 | + persist-credentials: false |
| 32 | + - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 |
26 | 33 | with: |
27 | 34 | go-version-file: go.mod |
28 | 35 | - run: make vet |
29 | 36 |
|
30 | 37 | fmt-check: |
31 | 38 | runs-on: ubuntu-latest |
| 39 | + permissions: |
| 40 | + contents: read |
32 | 41 | steps: |
33 | | - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
34 | | - - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 |
| 42 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 43 | + with: |
| 44 | + persist-credentials: false |
| 45 | + - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 |
35 | 46 | with: |
36 | 47 | go-version-file: go.mod |
37 | 48 | - run: make fmt-check |
38 | 49 |
|
39 | 50 | build: |
40 | 51 | runs-on: ubuntu-latest |
| 52 | + permissions: |
| 53 | + contents: read |
41 | 54 | steps: |
42 | | - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
43 | | - - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 |
| 55 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 56 | + with: |
| 57 | + persist-credentials: false |
| 58 | + - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 |
44 | 59 | with: |
45 | 60 | go-version-file: go.mod |
46 | 61 | - run: make build |
47 | 62 |
|
48 | 63 | surface-compat: |
49 | 64 | runs-on: ubuntu-latest |
| 65 | + permissions: |
| 66 | + contents: read |
50 | 67 | steps: |
51 | | - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
52 | | - - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 |
| 68 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 69 | + with: |
| 70 | + persist-credentials: false |
| 71 | + - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 |
53 | 72 | with: |
54 | 73 | go-version-file: go.mod |
55 | 74 | - run: go test ./internal/cmd/ -run TestSurface -v |
56 | 75 |
|
57 | 76 | lint: |
58 | 77 | runs-on: ubuntu-latest |
| 78 | + permissions: |
| 79 | + contents: read |
59 | 80 | steps: |
60 | | - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
61 | | - - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 |
| 81 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 82 | + with: |
| 83 | + persist-credentials: false |
| 84 | + - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 |
62 | 85 | with: |
63 | 86 | go-version-file: go.mod |
64 | | - - uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9 |
| 87 | + - uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0 |
65 | 88 | with: |
66 | 89 | version: v2.10.1 |
67 | 90 |
|
| 91 | + lint-actions: |
| 92 | + name: GitHub Actions audit |
| 93 | + runs-on: ubuntu-latest |
| 94 | + permissions: |
| 95 | + contents: read |
| 96 | + steps: |
| 97 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 98 | + with: |
| 99 | + persist-credentials: false |
| 100 | + - name: Run actionlint |
| 101 | + uses: rhysd/actionlint@393031adb9afb225ee52ae2ccd7a5af5525e03e8 # v1.7.11 |
| 102 | + - name: Run zizmor |
| 103 | + uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2 |
| 104 | + with: |
| 105 | + advanced-security: false |
| 106 | + |
68 | 107 | test-race: |
69 | 108 | runs-on: ubuntu-latest |
| 109 | + permissions: |
| 110 | + contents: read |
70 | 111 | steps: |
71 | | - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
72 | | - - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 |
| 112 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 113 | + with: |
| 114 | + persist-credentials: false |
| 115 | + - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 |
73 | 116 | with: |
74 | 117 | go-version-file: go.mod |
75 | 118 | - run: go test -race ./... |
0 commit comments