From e3c3a42f996e049b6bd8c1374272e32aa6423c4b Mon Sep 17 00:00:00 2001 From: Tobias K <6317548+theCalcaholic@users.noreply.github.com> Date: Thu, 25 Jan 2024 23:53:27 +0100 Subject: [PATCH] lxd-trigger.yml: Add arm64 job Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com> --- .github/workflows/build-lxd.yml | 33 ++++++------------------------- .github/workflows/lxd-trigger.yml | 6 ++++++ .github/workflows/release.yml | 2 +- 3 files changed, 13 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build-lxd.yml b/.github/workflows/build-lxd.yml index e875815ef..3c7f83966 100644 --- a/.github/workflows/build-lxd.yml +++ b/.github/workflows/build-lxd.yml @@ -8,7 +8,7 @@ on: arch: required: false type: string - default: 'x86' + default: 'x64' outputs: lxd_artifact_name: value: "${{ jobs.build-current.outputs.artifact_name }}" @@ -28,29 +28,9 @@ on: - release/* jobs: - determine-runner: - env: - LXD_ARCH: "${{ inputs.arch || 'x86' }}" - runs-on: ubuntu-20.04 - outputs: - runner_label: ${{ steps.script.outputs.runner_label }} - steps: - - name: script - id: script - run: | - if [[ "${LXD_ARCH}" == "arm64" ]] - then - RUNNER_LABEL='["ubuntu-22.04", "ARM64", "ncp"]' - else - RUNNER_LABEL='["ubuntu-22.04", "X64"]' - fi - echo "runner_label=$RUNNER_LABEL" | tee -a $GITHUB_OUTPUT build-current: - needs: - - determine-runner - runs-on: - - ${{ fromJSON(needs.determine-runner.outputs.runner_label) }} + runs-on: ${{ 'arm64' == inputs.arch && fromJSON('["ubuntu-22.04", "arm64"]') || fromJSON('["ubuntu-latest", "x64"]') }} outputs: artifact_name: "${{ env.ARTIFACT_NAME }}" artifact_file: "${{ steps.pack-lxd.outputs.artifact_file }}" @@ -86,7 +66,7 @@ jobs: if-no-files-found: error build-previous: - runs-on: ubuntu-20.04 + runs-on: ${{ 'arm64' == inputs.arch && fromJSON('["ubuntu-22.04", "arm64"]') || fromJSON('["ubuntu-latest", "x64"]') }} if: ${{ inputs.arch == 'x86' || inputs.arch == '' }} outputs: artifact_name: "${{ env.ARTIFACT_NAME }}" @@ -175,7 +155,7 @@ jobs: test-update: needs: - build-previous - runs-on: ubuntu-20.04 + runs-on: ${{ 'arm64' == inputs.arch && fromJSON('["ubuntu-22.04", "arm64"]') || fromJSON('["ubuntu-latest", "x64"]') }} outputs: artifact_name: "${{ env.ARTIFACT_NAME }}" artifact_file: "${{ steps.pack-lxd.outputs.artifact_file }}" @@ -294,9 +274,8 @@ jobs: test-fresh-install: needs: - - determine-runner - build-current - runs-on: ${{ fromJSON(needs.determine-runner.outputs.runner_label) }} + runs-on: ${{ 'arm64' == inputs.arch && fromJSON('["ubuntu-22.04", "arm64"]') || fromJSON('["ubuntu-latest", "x64"]') }} env: VERSION: "${{ inputs.git_ref || github.head_ref || github.ref_name }}" ARTIFACT_NAME: ${{ needs.build-current.outputs.artifact_name }} @@ -387,7 +366,7 @@ jobs: convert-to-lxc-image: needs: - build-current - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest outputs: artifact_name: "${{ steps.lxd-to-lxc.outputs.artifact_name }}" artifact_file: "${{ steps.lxd-to-lxc.outputs.artifact_file }}" diff --git a/.github/workflows/lxd-trigger.yml b/.github/workflows/lxd-trigger.yml index 45527394f..b4c8d2528 100644 --- a/.github/workflows/lxd-trigger.yml +++ b/.github/workflows/lxd-trigger.yml @@ -15,3 +15,9 @@ jobs: uses: ./.github/workflows/build-lxd.yml with: git_ref: "${{ github.ref }}" + arch: 'x64' + lxd-arm64: + uses: ./.github/workflows/build-lxd.yml + with: + git_ref: "${{ github.ref }}" + arch: 'arm64' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b5d40ad1a..7925c5945 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,7 +48,7 @@ jobs: uses: ./.github/workflows/build-lxd.yml with: git_ref: "${{ inputs.git_ref || github.head_ref || github.ref_name }}" - arch: 'x86' + arch: 'x64' secrets: inherit lxd-arm64: if: ${{ inputs.lxd || ( github.event_name != 'workflow_dispatch' && !startsWith(github.ref_name, 'docker-') ) }}