Explorar el Código

ci: move rerun-apps-version-check to a separate workflow

Ivan Dyachkov hace 1 año
padre
commit
8c33ab5fea
Se han modificado 2 ficheros con 28 adiciones y 18 borrados
  1. 0 18
      .github/workflows/release.yaml
  2. 28 0
      .github/workflows/rerun-apps-version-check.yaml

+ 0 - 18
.github/workflows/release.yaml

@@ -122,21 +122,3 @@ jobs:
           push "amazon/2" "packages/$PROFILE-$VERSION-amzn2-arm64.rpm"
           push "amazon/2023" "packages/$PROFILE-$VERSION-amzn2023-amd64.rpm"
           push "amazon/2023" "packages/$PROFILE-$VERSION-amzn2023-arm64.rpm"
-
-  rerun-apps-version-check:
-    runs-on: ubuntu-22.04
-    if: github.repository_owner == 'emqx' && github.event_name == 'release'
-    needs:
-      - upload
-    permissions:
-      pull-requests: read
-      checks: write
-      actions: write
-    steps:
-      - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
-      - name: trigger re-run of app versions check on open PRs
-        shell: bash
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        run: |
-          python3 scripts/rerun-apps-version-check.py

+ 28 - 0
.github/workflows/rerun-apps-version-check.yaml

@@ -0,0 +1,28 @@
+name: Rerun apps version check
+on:
+  workflow_dispatch:
+  workflow_run:
+    workflows:
+      - "Upload release assets"
+    types:
+      - completed
+
+permissions:
+  contents: read
+
+jobs:
+  rerun-apps-version-check:
+    runs-on: ubuntu-22.04
+    if: github.event.workflow_run.conclusion == 'success'
+    permissions:
+      pull-requests: read
+      checks: write
+      actions: write
+    steps:
+      - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
+      - name: trigger re-run of app versions check on open PRs
+        shell: bash
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        run: |
+          python3 scripts/rerun-apps-version-check.py