ci: fix build_packages workflows

This commit is contained in:
Ivan Dyachkov 2023-10-05 12:56:53 +02:00
parent 72720389ff
commit 9f4afcaa5c
3 changed files with 6 additions and 25 deletions

View File

@ -11,9 +11,7 @@ on:
- 'e*'
branches:
- 'master'
- 'release-51'
- 'release-52'
- 'release-53'
- 'release-5?'
- 'ci/**'
env:
@ -21,7 +19,7 @@ env:
jobs:
prepare:
runs-on: ${{ fromJSON(github.repository_owner == 'emqx' && '["aws-amd64"]' || '["ubuntu-22.04"]') }}
runs-on: ${{ fromJSON(github.repository_owner == 'emqx' && '["self-hosted", "ephemeral"]' || '["ubuntu-22.04"]') }}
container: 'ghcr.io/emqx/emqx-builder/5.1-4:1.14.5-25.3.2-2-ubuntu22.04'
outputs:
profile: ${{ steps.parse-git-ref.outputs.profile }}
@ -95,7 +93,6 @@ jobs:
otp_vsn: ${{ needs.prepare.outputs.otp_vsn }}
elixir_vsn: ${{ needs.prepare.outputs.elixir_vsn }}
builder_vsn: ${{ needs.prepare.outputs.builder_vsn }}
runner_labels: ${{ needs.prepare.outputs.runner_labels }}
secrets: inherit
build_and_push_docker_images:

View File

@ -19,9 +19,6 @@ on:
elixir_vsn:
required: true
type: string
runner_labels:
required: true
type: string
builder_vsn:
required: true
type: string
@ -62,10 +59,6 @@ on:
required: false
type: string
default: '1.14.5'
runner_labels:
required: false
type: string
default: '["self-hosted","ephemeral"]'
builder_vsn:
required: false
type: string
@ -158,7 +151,7 @@ jobs:
path: _packages/${{ matrix.profile }}/
linux:
runs-on: ${{ matrix.build_machine }}
runs-on: ['self-hosted', 'linux', "${{ matrix.arch }}"]
# always run in builder container because the host might have the wrong OTP version etc.
# otherwise buildx.sh does not run docker if arch and os matches the target arch and os.
container:
@ -172,7 +165,7 @@ jobs:
otp:
- ${{ inputs.otp_vsn }}
arch:
- amd64
- x64
- arm64
os:
- ubuntu22.04
@ -186,26 +179,17 @@ jobs:
- el7
- amzn2
- amzn2023
build_machine:
- aws-arm64
- aws-amd64
builder:
- ${{ inputs.builder_vsn }}
elixir:
- ${{ inputs.elixir_vsn }}
with_elixir:
- 'no'
exclude:
- arch: arm64
build_machine: aws-amd64
- arch: amd64
build_machine: aws-arm64
include:
- profile: emqx
otp: ${{ inputs.otp_vsn }}
arch: amd64
arch: x64
os: ubuntu22.04
build_machine: aws-amd64
builder: ${{ inputs.builder_vsn }}
elixir: ${{ inputs.elixir_vsn }}
with_elixir: 'yes'

View File

@ -12,7 +12,7 @@ on:
jobs:
linux:
if: github.repository_owner == 'emqx'
runs-on: ['self-hosted', 'linux', 'x64', 'ephemeral']
runs-on: ['self-hosted', 'linux', "${{ matrix.arch }}", 'ephemeral']
container:
image: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }}"