Преглед изворни кода

ci: explicitly specify architecture in runner labels

Ivan Dyachkov пре 2 година
родитељ
комит
fb6b02c1ea

+ 4 - 4
.github/workflows/_pr_entrypoint.yaml

@@ -16,7 +16,7 @@ env:
 
 jobs:
   sanity-checks:
-    runs-on: ${{ fromJSON(github.repository_owner == 'emqx' && '["self-hosted","ephemeral"]' || '["ubuntu-22.04"]') }}
+    runs-on: ${{ fromJSON(github.repository_owner == 'emqx' && '["self-hosted","ephemeral","linux","x64"]' || '["ubuntu-22.04"]') }}
     container: "ghcr.io/emqx/emqx-builder/5.1-4:1.14.5-25.3.2-2-ubuntu22.04"
     outputs:
       ct-matrix: ${{ steps.matrix.outputs.ct-matrix }}
@@ -24,7 +24,7 @@ jobs:
       ct-docker: ${{ steps.matrix.outputs.ct-docker }}
       version-emqx: ${{ steps.matrix.outputs.version-emqx }}
       version-emqx-enterprise: ${{ steps.matrix.outputs.version-emqx-enterprise }}
-      runner_labels: ${{ github.repository_owner == 'emqx' && '["self-hosted", "ephemeral"]' || '["ubuntu-22.04"]' }}
+      runner_labels: ${{ github.repository_owner == 'emqx' && '["self-hosted","ephemeral","linux","x64"]' || '["ubuntu-22.04"]' }}
       builder: "ghcr.io/emqx/emqx-builder/5.1-4:1.14.5-25.3.2-2-ubuntu22.04"
       builder_vsn: "5.1-4"
       otp_vsn: "25.3.2-2"
@@ -57,8 +57,8 @@ jobs:
         env:
           ACTIONLINT_VSN: 1.6.25
         run: |
-          wget https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VSN}/actionlint_${ACTIONLINT_VSN}_linux_amd64.tar.gz
-          tar zxf actionlint_${ACTIONLINT_VSN}_linux_amd64.tar.gz actionlint
+          wget -q https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VSN}/actionlint_${ACTIONLINT_VSN}_linux_$(dpkg --print-architecture).tar.gz -O actionlint.tar.gz
+          tar zxf actionlint.tar.gz actionlint
           # TODO: enable shellcheck when all the current issues are fixed
           ./actionlint -color \
             -shellcheck= \

+ 2 - 2
.github/workflows/_push-entrypoint.yaml

@@ -19,7 +19,7 @@ env:
 
 jobs:
   prepare:
-    runs-on: ${{ fromJSON(github.repository_owner == 'emqx' && '["self-hosted", "ephemeral"]' || '["ubuntu-22.04"]') }}
+    runs-on: ${{ fromJSON(github.repository_owner == 'emqx' && '["self-hosted","ephemeral","linux","x64"]' || '["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 }}
@@ -29,7 +29,7 @@ jobs:
       ct-matrix: ${{ steps.matrix.outputs.ct-matrix }}
       ct-host: ${{ steps.matrix.outputs.ct-host }}
       ct-docker: ${{ steps.matrix.outputs.ct-docker }}
-      runner_labels: ${{ github.repository_owner == 'emqx' && '["self-hosted", "ephemeral"]' || '["ubuntu-22.04"]' }}
+      runner_labels: ${{ github.repository_owner == 'emqx' && '["self-hosted","ephemeral","linux","x64"]' || '["ubuntu-22.04"]' }}
       builder: 'ghcr.io/emqx/emqx-builder/5.1-4:1.14.5-25.3.2-2-ubuntu22.04'
       builder_vsn: '5.1-4'
       otp_vsn: '25.3.2-2'

+ 1 - 1
.github/workflows/build_and_push_docker_images.yaml

@@ -73,7 +73,7 @@ on:
       runner_labels:
         required: false
         type: string
-        default: '["self-hosted","ephemeral", "linux"]'
+        default: '["self-hosted","ephemeral","linux","x64"]'
 
 jobs:
   docker:

+ 1 - 1
.github/workflows/build_packages.yaml

@@ -151,7 +151,7 @@ jobs:
         path: _packages/${{ matrix.profile }}/
 
   linux:
-    runs-on: ['self-hosted', 'linux', "${{ matrix.arch }}"]
+    runs-on: ['self-hosted', 'ephemeral', '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:

+ 1 - 1
.github/workflows/build_packages_cron.yaml

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

+ 1 - 1
.github/workflows/build_slim_packages.yaml

@@ -30,7 +30,7 @@ on:
       runner_labels:
         required: false
         type: string
-        default: '["self-hosted","ephemeral"]'
+        default: '["self-hosted","ephemeral", "linux", "x64"]'
       builder:
         required: false
         type: string