Skip to content

Commit 35749fc

Browse files
committed
hack: simplify flavor selection
1 parent 20a4326 commit 35749fc

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ on:
2222
name:
2323
required: true
2424
type: string
25+
minimal:
26+
required: false
27+
type: boolean
28+
default: true
29+
30+
env:
31+
MINIMAL: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.minimal || inputs.minimal }}
32+
33+
2534
jobs:
2635
build:
2736
name: Build ${{ inputs.name }} ${{ inputs.target }}
@@ -57,21 +66,13 @@ jobs:
5766
"${{ github.event.number }}" "${{ github.event.pull_request.head.sha }}" \
5867
| tee -a $GITHUB_OUTPUT $GITHUB_ENV
5968
fi
60-
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
61-
if [ "${{ github.event.inputs.minimal }}" == "true" ]; then
62-
flavor="_minimal"
63-
fi
64-
else
65-
# Ensure 'release' job get the proper image when building main
66-
if [ "$GITHUB_REF_NAME" != "main" ]; then
67-
flavor="_minimal"
69+
70+
if [ "${MINIMAL}" == "true" ]; then
71+
flavor="_minimal"
6872
else
69-
flavor=""
70-
fi
71-
if ${{ contains(github.event.pull_request.labels.*.name, 'ci:main') }}; then
72-
flavor=""
73-
fi
73+
flavor=""
7474
fi
75+
7576
target=${{ inputs.target }}
7677
name=${{ inputs.name }}
7778
echo "dir=${name}-${target}" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)