|
18 | 18 | GOPRIVATE: github.com/hashicorp # Required for enterprise deps
|
19 | 19 |
|
20 | 20 | jobs:
|
| 21 | + get-go-version: |
| 22 | + uses: ./.github/workflows/reusable-get-go-version.yml |
| 23 | + |
21 | 24 | set-product-version:
|
22 | 25 | runs-on: ubuntu-latest
|
23 | 26 | outputs:
|
@@ -81,32 +84,25 @@ jobs:
|
81 | 84 | path: ${{ steps.generate-metadata-file.outputs.filepath }}
|
82 | 85 |
|
83 | 86 | build:
|
84 |
| - needs: set-product-version |
| 87 | + needs: |
| 88 | + - set-product-version |
| 89 | + - get-go-version |
85 | 90 | runs-on: ubuntu-latest
|
86 | 91 | strategy:
|
87 | 92 | matrix:
|
88 | 93 | include:
|
89 |
| - - {go: "1.20.12", |
90 |
| - goos: "linux", goarch: "386"} |
91 |
| - - {go: "1.20.12", |
92 |
| - goos: "linux", goarch: "amd64"} |
93 |
| - - {go: "1.20.12", |
94 |
| - goos: "linux", goarch: "arm"} |
95 |
| - - {go: "1.20.12", |
96 |
| - goos: "linux", goarch: "arm64"} |
97 |
| - - {go: "1.20.12", |
98 |
| - goos: "freebsd", goarch: "386"} |
99 |
| - - {go: "1.20.12", |
100 |
| - goos: "freebsd", goarch: "amd64"} |
101 |
| - - {go: "1.20.12", |
102 |
| - goos: "windows", goarch: "386"} |
103 |
| - - {go: "1.20.12", |
104 |
| - goos: "windows", goarch: "amd64"} |
105 |
| - - {go: "1.20.12", |
106 |
| - goos: "solaris", goarch: "amd64"} |
| 94 | + - {goos: "linux", goarch: "386"} |
| 95 | + - {goos: "linux", goarch: "amd64"} |
| 96 | + - {goos: "linux", goarch: "arm"} |
| 97 | + - {goos: "linux", goarch: "arm64"} |
| 98 | + - {goos: "freebsd", goarch: "386"} |
| 99 | + - {goos: "freebsd", goarch: "amd64"} |
| 100 | + - {goos: "windows", goarch: "386"} |
| 101 | + - {goos: "windows", goarch: "amd64"} |
| 102 | + - {goos: "solaris", goarch: "amd64"} |
107 | 103 | fail-fast: true
|
108 | 104 |
|
109 |
| - name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build |
| 105 | + name: Go ${{ needs.get-go-version.outputs.go-version }} ${{ matrix.goos }} ${{ matrix.goarch }} build |
110 | 106 | steps:
|
111 | 107 | - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
112 | 108 |
|
@@ -140,7 +136,7 @@ jobs:
|
140 | 136 | with:
|
141 | 137 | product_name: ${{ env.PKG_NAME }}
|
142 | 138 | product_version: ${{ needs.set-product-version.outputs.product-version }}
|
143 |
| - go_version: ${{ matrix.go }} |
| 139 | + go_version: ${{ needs.get-go-version.outputs.go-version }} |
144 | 140 | os: ${{ matrix.goos }}
|
145 | 141 | arch: ${{ matrix.goarch }}
|
146 | 142 | reproducible: report
|
@@ -186,17 +182,18 @@ jobs:
|
186 | 182 | path: out/${{ env.DEB_PACKAGE }}
|
187 | 183 |
|
188 | 184 | build-s390x:
|
189 |
| - needs: set-product-version |
| 185 | + needs: |
| 186 | + - set-product-version |
| 187 | + - get-go-version |
190 | 188 | if: ${{ endsWith(github.repository, '-enterprise') }}
|
191 | 189 | runs-on: ubuntu-latest
|
192 | 190 | strategy:
|
193 | 191 | matrix:
|
194 | 192 | include:
|
195 |
| - - {go: "1.20.12", |
196 |
| - goos: "linux", goarch: "s390x"} |
| 193 | + - {goos: "linux", goarch: "s390x"} |
197 | 194 | fail-fast: true
|
198 | 195 |
|
199 |
| - name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build |
| 196 | + name: Go ${{ needs.get-go-version.outputs.go-version }} ${{ matrix.goos }} ${{ matrix.goarch }} build |
200 | 197 | steps:
|
201 | 198 | - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
202 | 199 |
|
@@ -230,24 +227,25 @@ jobs:
|
230 | 227 | with:
|
231 | 228 | product_name: ${{ env.PKG_NAME }}
|
232 | 229 | product_version: ${{ needs.set-product-version.outputs.product-version }}
|
233 |
| - go_version: ${{ matrix.go }} |
| 230 | + go_version: ${{ needs.get-go-version.outputs.go-version }} |
234 | 231 | os: ${{ matrix.goos }}
|
235 | 232 | arch: ${{ matrix.goarch }}
|
236 | 233 | reproducible: report
|
237 | 234 | instructions: |-
|
238 | 235 | go build -ldflags="$GOLDFLAGS" -o "$BIN_PATH" -trimpath -buildvcs=false
|
239 | 236 |
|
240 | 237 | build-darwin:
|
241 |
| - needs: set-product-version |
| 238 | + needs: |
| 239 | + - set-product-version |
| 240 | + - get-go-version |
242 | 241 | runs-on: macos-latest
|
243 | 242 | strategy:
|
244 | 243 | matrix:
|
245 | 244 | goos: [ darwin ]
|
246 | 245 | goarch: [ "amd64", "arm64" ]
|
247 |
| - go: [ "1.20.12" ] |
248 | 246 | fail-fast: true
|
249 | 247 |
|
250 |
| - name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build |
| 248 | + name: Go ${{ needs.get-go-version.outputs.go-version }} ${{ matrix.goos }} ${{ matrix.goarch }} build |
251 | 249 | steps:
|
252 | 250 | - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
253 | 251 |
|
@@ -279,7 +277,7 @@ jobs:
|
279 | 277 | with:
|
280 | 278 | product_name: ${{ env.PKG_NAME }}
|
281 | 279 | product_version: ${{ needs.set-product-version.outputs.product-version }}
|
282 |
| - go_version: ${{ matrix.go }} |
| 280 | + go_version: ${{ needs.get-go-version.outputs.go-version }} |
283 | 281 | os: ${{ matrix.goos }}
|
284 | 282 | arch: ${{ matrix.goarch }}
|
285 | 283 | reproducible: report
|
|
0 commit comments