@@ -3,6 +3,10 @@ name: Build
33on :
44 workflow_dispatch:
55 inputs:
6+ target:
7+ description: "Build target (e.g. aarch64)"
8+ default: "x86_64"
9+ type: string
610 flavor:
711 description: 'Optional build flavor (e.g. _minimal)'
812 default: ''
1115 description: 'Massive parallel build of each image'
1216 default: true
1317 type: boolean
18+ name:
19+ description: "Name (for spin overrides)"
20+ default: "infix"
21+ type: string
1422 infix_repo:
1523 description: 'Repo to checkout (for spin overrides)'
1624 default: kernelkit/infix
3947 default: false
4048
4149env :
50+ NAME: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }}
51+ TARGET: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
4252 FLV: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.flavor || inputs.flavor }}
4353 INFIX_REPO: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.infix_repo || inputs.infix_repo }}
4454
4555jobs :
4656 build:
47- name : Build ${{ inputs.name }} ${{ inputs.target }}
57+ name : >
58+ Build
59+ ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }}
60+ ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
61+
4862 runs-on: [ self-hosted, latest ]
4963 strategy:
5064 fail-fast: false
8195 | tee -a $GITHUB_OUTPUT $GITHUB_ENV
8296 fi
8397
84- target=${{ inputs.target }}
85- name=${{ inputs.name }}
98+ target=${{ env.TARGET }}
99+ name=${{ env.NAME }}
86100 echo "dir=${name}-${target}" >> $GITHUB_OUTPUT
87101 echo "tgz=${name}-${target}.tar.gz" >> $GITHUB_OUTPUT
88102 echo "flv=$FLV" >> $GITHUB_OUTPUT
@@ -100,16 +114,16 @@ jobs:
100114 uses: actions/cache@v4
101115 with:
102116 path: .ccache/
103- key : ccache-${{ inputs.target }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
117+ key: ccache-${{ env.TARGET }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
104118 restore-keys: |
105- ccache-${{ inputs.target }}-
119+ ccache-${{ env.TARGET }}-
106120 ccache-
107121
108- - name : Configure ${{ inputs.target }}${{ steps.vars.outputs.flv }}
122+ - name: Configure ${{ env.TARGET }}${{ steps.vars.outputs.flv }}
109123 run: |
110- make ${{ inputs.target }}${{ steps.vars.outputs.flv }}_defconfig
124+ make ${{ env.TARGET }}${{ steps.vars.outputs.flv }}_defconfig
111125
112- - name : Unit Test ${{ inputs.target }}
126+ - name: Unit Test ${{ env.TARGET }}
113127 run: |
114128 make test-unit
115129
@@ -127,9 +141,9 @@ jobs:
127141 fi
128142 echo "MAKE=$MAKE" >> $GITHUB_OUTPUT
129143
130- - name : Build ${{ inputs.target }}${{ steps.vars.outputs.flv }}
144+ - name: Build ${{ env.TARGET }}${{ steps.vars.outputs.flv }}
131145 run: |
132- echo "Building ${{ inputs.target }}${{ steps.vars.outputs.flv }}_defconfig ..."
146+ echo "Building ${{ env.TARGET }}${{ steps.vars.outputs.flv }}_defconfig ..."
133147 eval "${{ steps.parallel.outputs.MAKE }}"
134148
135149 - name: Check SBOM from Build
@@ -151,7 +165,7 @@ jobs:
151165 printf "Size of output/images/: "
152166 ls -l output/images/
153167
154- - name : Prepare ${{ inputs.target }} Artifact
168+ - name: Prepare ${{ env.TARGET }} Artifact
155169 run: |
156170 cd output/
157171 mv images ${{ steps.vars.outputs.dir }}
@@ -161,4 +175,4 @@ jobs:
161175 - uses: actions/upload-artifact@v4
162176 with:
163177 path: output/${{ steps.vars.outputs.tgz }}
164- name : artifact-${{ inputs.target }}
178+ name: artifact-${{ env.TARGET }}
0 commit comments