Skip to content

Commit d3e370d

Browse files
committed
only run docker test steps on linux
Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
1 parent 91a1c9b commit d3e370d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/base-ci-goreleaser.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ jobs:
4141
GOARCH: arm
4242
- GOOS: windows
4343
GOARCH: s390x
44-
- GOOS: darwin
45-
GOARCH: ppc64le
4644
runs-on: ubuntu-24.04
4745
outputs:
4846
version: ${{ steps.prep.outputs.version }}
@@ -185,6 +183,7 @@ jobs:
185183
if-no-files-found: error
186184

187185
- name: Prepare variables
186+
if: matrix.GOOS == 'linux'
188187
id: prep
189188
run: |
190189
# Find version number and types of built artifacts
@@ -200,17 +199,19 @@ jobs:
200199
echo "binary-path=$(cat ./distributions/${{ inputs.distribution }}/dist/**/artifacts.json | jq -r 'map(select(any(.type; contains("Binary")))) | .[].path' )" >> "$GITHUB_OUTPUT"
201200
202201
- name: Print version and target
202+
if: matrix.GOOS == 'linux'
203203
run: |
204204
echo 'Version: ${{ steps.prep.outputs.version }}'
205205
echo 'Types: ${{ steps.prep.outputs.types }}'
206206
echo 'Arch: ${{ steps.prep.outputs.arch }}'
207207
echo 'Images?: ${{ steps.prep.outputs.container-images }}'
208208
209209
- name: Copy binary to distro root folder
210+
if: matrix.GOOS == 'linux'
210211
run: cp ./distributions/${{ inputs.distribution }}/${{ steps.prep.outputs.binary-path }} ./distributions/${{ inputs.distribution }}
211212

212213
- name: Build container images locally
213-
if: contains(steps.prep.outputs.types, 'Docker Image')
214+
if: matrix.GOOS == 'linux' && contains(steps.prep.outputs.types, 'Docker Image')
214215
uses: docker/build-push-action@0adf9959216b96bec444f325f1e493d4aa344497 # v6.14.0
215216
with:
216217
context: ./distributions/${{ inputs.distribution }}
@@ -219,12 +220,12 @@ jobs:
219220
tags: ${{ inputs.distribution }}:${{ steps.prep.outputs.version }}-${{ steps.prep.outputs.arch }}
220221

221222
- name: Export container image to tarball
222-
if: contains(steps.prep.outputs.types, 'Docker Image')
223+
if: matrix.GOOS == 'linux' && contains(steps.prep.outputs.types, 'Docker Image')
223224
run: |
224225
docker save ${{ inputs.distribution }}:${{ steps.prep.outputs.version }}-${{ steps.prep.outputs.arch }} > /tmp/${{ inputs.distribution }}.tar
225226
226227
- name: Upload container image artifact
227-
if: contains(steps.prep.outputs.types, 'Docker Image')
228+
if: matrix.GOOS == 'linux' && contains(steps.prep.outputs.types, 'Docker Image')
228229
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
229230
with:
230231
name: ${{ inputs.distribution }}-image-${{ steps.prep.outputs.version }}-${{ steps.prep.outputs.arch }}

0 commit comments

Comments
 (0)