Skip to content

Commit e3c3a42

Browse files
committed
lxd-trigger.yml: Add arm64 job
Signed-off-by: Tobias K <[email protected]>
1 parent 5c6cbad commit e3c3a42

File tree

3 files changed

+13
-28
lines changed

3 files changed

+13
-28
lines changed

.github/workflows/build-lxd.yml

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
arch:
99
required: false
1010
type: string
11-
default: 'x86'
11+
default: 'x64'
1212
outputs:
1313
lxd_artifact_name:
1414
value: "${{ jobs.build-current.outputs.artifact_name }}"
@@ -28,29 +28,9 @@ on:
2828
- release/*
2929

3030
jobs:
31-
determine-runner:
32-
env:
33-
LXD_ARCH: "${{ inputs.arch || 'x86' }}"
34-
runs-on: ubuntu-20.04
35-
outputs:
36-
runner_label: ${{ steps.script.outputs.runner_label }}
37-
steps:
38-
- name: script
39-
id: script
40-
run: |
41-
if [[ "${LXD_ARCH}" == "arm64" ]]
42-
then
43-
RUNNER_LABEL='["ubuntu-22.04", "ARM64", "ncp"]'
44-
else
45-
RUNNER_LABEL='["ubuntu-22.04", "X64"]'
46-
fi
47-
echo "runner_label=$RUNNER_LABEL" | tee -a $GITHUB_OUTPUT
4831

4932
build-current:
50-
needs:
51-
- determine-runner
52-
runs-on:
53-
- ${{ fromJSON(needs.determine-runner.outputs.runner_label) }}
33+
runs-on: ${{ 'arm64' == inputs.arch && fromJSON('["ubuntu-22.04", "arm64"]') || fromJSON('["ubuntu-latest", "x64"]') }}
5434
outputs:
5535
artifact_name: "${{ env.ARTIFACT_NAME }}"
5636
artifact_file: "${{ steps.pack-lxd.outputs.artifact_file }}"
@@ -86,7 +66,7 @@ jobs:
8666
if-no-files-found: error
8767

8868
build-previous:
89-
runs-on: ubuntu-20.04
69+
runs-on: ${{ 'arm64' == inputs.arch && fromJSON('["ubuntu-22.04", "arm64"]') || fromJSON('["ubuntu-latest", "x64"]') }}
9070
if: ${{ inputs.arch == 'x86' || inputs.arch == '' }}
9171
outputs:
9272
artifact_name: "${{ env.ARTIFACT_NAME }}"
@@ -175,7 +155,7 @@ jobs:
175155
test-update:
176156
needs:
177157
- build-previous
178-
runs-on: ubuntu-20.04
158+
runs-on: ${{ 'arm64' == inputs.arch && fromJSON('["ubuntu-22.04", "arm64"]') || fromJSON('["ubuntu-latest", "x64"]') }}
179159
outputs:
180160
artifact_name: "${{ env.ARTIFACT_NAME }}"
181161
artifact_file: "${{ steps.pack-lxd.outputs.artifact_file }}"
@@ -294,9 +274,8 @@ jobs:
294274
295275
test-fresh-install:
296276
needs:
297-
- determine-runner
298277
- build-current
299-
runs-on: ${{ fromJSON(needs.determine-runner.outputs.runner_label) }}
278+
runs-on: ${{ 'arm64' == inputs.arch && fromJSON('["ubuntu-22.04", "arm64"]') || fromJSON('["ubuntu-latest", "x64"]') }}
300279
env:
301280
VERSION: "${{ inputs.git_ref || github.head_ref || github.ref_name }}"
302281
ARTIFACT_NAME: ${{ needs.build-current.outputs.artifact_name }}
@@ -387,7 +366,7 @@ jobs:
387366
convert-to-lxc-image:
388367
needs:
389368
- build-current
390-
runs-on: ubuntu-20.04
369+
runs-on: ubuntu-latest
391370
outputs:
392371
artifact_name: "${{ steps.lxd-to-lxc.outputs.artifact_name }}"
393372
artifact_file: "${{ steps.lxd-to-lxc.outputs.artifact_file }}"

.github/workflows/lxd-trigger.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,9 @@ jobs:
1515
uses: ./.github/workflows/build-lxd.yml
1616
with:
1717
git_ref: "${{ github.ref }}"
18+
arch: 'x64'
19+
lxd-arm64:
20+
uses: ./.github/workflows/build-lxd.yml
21+
with:
22+
git_ref: "${{ github.ref }}"
23+
arch: 'arm64'

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
uses: ./.github/workflows/build-lxd.yml
4949
with:
5050
git_ref: "${{ inputs.git_ref || github.head_ref || github.ref_name }}"
51-
arch: 'x86'
51+
arch: 'x64'
5252
secrets: inherit
5353
lxd-arm64:
5454
if: ${{ inputs.lxd || ( github.event_name != 'workflow_dispatch' && !startsWith(github.ref_name, 'docker-') ) }}

0 commit comments

Comments
 (0)