Skip to content

Commit

Permalink
Allow matrix to by dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerHelmuth committed Mar 28, 2024
1 parent 70b0536 commit c9c9dcf
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/base-ci-goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@ on:
distribution:
required: true
type: string
goos:
required: true
type: string
goarch:
required: true
type: string

jobs:
check-goreleaser:
strategy:
matrix:
GOOS: [ linux, windows, darwin ]
GOARCH: [ "386", amd64, arm64, ppc64le, arm, s390x ]
GOOS: ${{ fromJSON( inputs.goos) }}
GOARCH: ${{ fromJSON( inputs.goarch) }}
exclude:
- GOOS: darwin
GOARCH: "386"
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/base-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@ on:
distribution:
required: true
type: string
goos:
required: true
type: string
goarch:
required: true
type: string

jobs:
prepare:
strategy:
matrix:
GOOS: [linux, windows, darwin]
GOARCH: ["386", amd64, arm64, ppc64le, arm, s390x]
GOOS: ${{ fromJSON( inputs.goos) }}
GOARCH: ${{ fromJSON( inputs.goarch) }}
exclude:
- GOOS: darwin
GOARCH: "386"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-goreleaser-contrib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ jobs:
uses: ./.github/workflows/base-ci-goreleaser.yaml
with:
distribution: otelcol-contrib
goos: '[ "linux", "windows", "darwin" ]'
goarch: '[ "386", "amd64", "arm64", "ppc64le", "arm", "s390x" ]'
secrets: inherit
2 changes: 2 additions & 0 deletions .github/workflows/ci-goreleaser-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ jobs:
uses: ./.github/workflows/base-ci-goreleaser.yaml
with:
distribution: otelcol
goos: '[ "linux", "windows", "darwin" ]'
goarch: '[ "386", "amd64", "arm64", "ppc64le", "arm", "s390x" ]'
secrets: inherit
2 changes: 2 additions & 0 deletions .github/workflows/ci-goreleaser-k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ jobs:
uses: ./.github/workflows/base-ci-goreleaser.yaml
with:
distribution: otelcol-k8s
goos: '[ "linux" ]'
goarch: '[ "amd64", "arm64", "ppc64le", "s390x" ]'
secrets: inherit
2 changes: 2 additions & 0 deletions .github/workflows/release-contrib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ jobs:
uses: ./.github/workflows/base-release.yaml
with:
distribution: otelcol-contrib
goos: '[ "linux", "windows", "darwin" ]'
goarch: '[ "386", "amd64", "arm64", "ppc64le", "arm", "s390x" ]'
secrets: inherit
permissions: write-all
2 changes: 2 additions & 0 deletions .github/workflows/release-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ jobs:
uses: ./.github/workflows/base-release.yaml
with:
distribution: otelcol
goos: '[ "linux", "windows", "darwin" ]'
goarch: '[ "386", "amd64", "arm64", "ppc64le", "arm", "s390x" ]'
secrets: inherit
permissions: write-all
2 changes: 2 additions & 0 deletions .github/workflows/release-k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ jobs:
uses: ./.github/workflows/base-release.yaml
with:
distribution: otelcol-k8s
goos: '[ "linux" ]'
goarch: '[ "amd64", "arm64", "ppc64le", "s390x" ]'
secrets: inherit
permissions: write-all

0 comments on commit c9c9dcf

Please sign in to comment.