Просмотр исходного кода

ci(build_packages_cron): remove non-existing dependency

also build emqx package on master only, and ee on release-50 only
Ivan Dyachkov 2 лет назад
Родитель
Сommit
86ea3f2de2
1 измененных файлов с 14 добавлено и 10 удалено
  1. 14 10
      .github/workflows/build_packages_cron.yaml

+ 14 - 10
.github/workflows/build_packages_cron.yaml

@@ -11,7 +11,7 @@ on:
 
 
 jobs:
 jobs:
   linux:
   linux:
-    needs: prepare
+    if: github.repository_owner == 'emqx'
     runs-on: aws-${{ matrix.arch }}
     runs-on: aws-${{ matrix.arch }}
     # always run in builder container because the host might have the wrong OTP version etc.
     # 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.
     # otherwise buildx.sh does not run docker if arch and os matches the target arch and os.
@@ -22,8 +22,8 @@ jobs:
       fail-fast: false
       fail-fast: false
       matrix:
       matrix:
         profile:
         profile:
-          - emqx
-          - emqx-enterprise
+          - ['emqx', 'master']
+          - ['emqx-enterprise', 'release-50']
         branch:
         branch:
           - master
           - master
           - release-50
           - release-50
@@ -47,13 +47,13 @@ jobs:
       - uses: emqx/self-hosted-cleanup-action@v1.0.3
       - uses: emqx/self-hosted-cleanup-action@v1.0.3
       - uses: actions/checkout@v3
       - uses: actions/checkout@v3
         with:
         with:
-          ref: ${{ matrix.branch }}
+          ref: ${{ matrix.profile[1] }}
           fetch-depth: 0
           fetch-depth: 0
 
 
       - name: build emqx packages
       - name: build emqx packages
         env:
         env:
           ELIXIR: ${{ matrix.elixir }}
           ELIXIR: ${{ matrix.elixir }}
-          PROFILE: ${{ matrix.profile }}
+          PROFILE: ${{ matrix.profile[0] }}
           ARCH: ${{ matrix.arch }}
           ARCH: ${{ matrix.arch }}
         run: |
         run: |
           set -eu
           set -eu
@@ -71,8 +71,8 @@ jobs:
       - uses: actions/upload-artifact@v3
       - uses: actions/upload-artifact@v3
         if: success()
         if: success()
         with:
         with:
-          name: ${{ matrix.profile }}
-          path: _packages/${{ matrix.profile }}/
+          name: ${{ matrix.profile[0] }}
+          path: _packages/${{ matrix.profile[0] }}/
       - name: Send notification to Slack
       - name: Send notification to Slack
         uses: slackapi/slack-github-action@v1.23.0
         uses: slackapi/slack-github-action@v1.23.0
         if: failure()
         if: failure()
@@ -80,21 +80,25 @@ jobs:
           SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
           SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
         with:
         with:
           payload: |
           payload: |
-            {"text": "Scheduled build of ${{ matrix.profile }} package for ${{ matrix.os }} failed: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"}
+            {"text": "Scheduled build of ${{ matrix.profile[0] }} package for ${{ matrix.os }} failed: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"}
 
 
   mac:
   mac:
-    needs: prepare
+    runs-on: ${{ matrix.os }}
+    if: github.repository_owner == 'emqx'
+
     strategy:
     strategy:
       fail-fast: false
       fail-fast: false
       matrix:
       matrix:
         profile:
         profile:
           - emqx
           - emqx
+        branch:
+          - master
         otp:
         otp:
           - 24.3.4.2-3
           - 24.3.4.2-3
         os:
         os:
           - macos-12
           - macos-12
           - macos-12-arm64
           - macos-12-arm64
-    runs-on: ${{ matrix.os }}
+
     steps:
     steps:
       - uses: emqx/self-hosted-cleanup-action@v1.0.3
       - uses: emqx/self-hosted-cleanup-action@v1.0.3
       - uses: actions/checkout@v3
       - uses: actions/checkout@v3