build: fix profile detection when building packages

This commit is contained in:
Ivan Dyachkov 2022-09-28 17:58:06 +02:00
parent 046eb727cd
commit d07a39eafd
2 changed files with 21 additions and 16 deletions

View File

@ -1,6 +1,6 @@
name: 'Create MacOS package'
inputs:
profile: # emqx, emqx-enterprise
profile: # emqx, emqx-ee
required: true
type: string
otp: # 24.2.1-1, 23.3.4.9-3

View File

@ -5,16 +5,31 @@ on:
workflow_dispatch:
jobs:
prepare:
outputs:
profiles: ${{ steps.detect-profiles.outputs.profiles}}
steps:
- uses: actions/checkout@v1
- name: fix-git-unsafe-repository
run: git config --global --add safe.directory /__w/emqx/emqx
- id: detect-profiles
uses: ./.github/actions/detect-profiles
with:
ci_git_token: ${{ secrets.CI_GIT_TOKEN }}
build:
runs-on: ${{ matrix.runs-on }}
needs: prepare
strategy:
matrix:
profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
otp:
- erl23.3.4.9-3
- erl23.3.4.9-3
os:
- ubuntu20.04
- centos7
- ubuntu20.04
- centos7
runs-on:
- aws-amd64
- ubuntu-20.04
@ -29,12 +44,6 @@ jobs:
container: emqx/build-env:${{ matrix.otp }}-${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: ./.github/actions/detect-profiles
with:
ci_git_token: ${{ secrets.CI_GIT_TOKEN }}
- name: fix-git-unsafe-repository
run: git config --global --add safe.directory /__w/emqx/emqx
- uses: actions/cache@v2
with:
# dialyzer PLTs
@ -63,20 +72,16 @@ jobs:
path: _packages/**/*.zip
mac:
needs: prepare
strategy:
matrix:
profile:
- emqx
profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
otp:
- 23.3.4.9-3
os:
- macos-11
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: ./.github/actions/detect-profiles
with:
ci_git_token: ${{ secrets.CI_GIT_TOKEN }}
- uses: ./.github/actions/package-macos
with:
profile: ${{ matrix.profile }}