From d88915c06382aa640592ac33bd4f45426a781ec3 Mon Sep 17 00:00:00 2001 From: bbhtt Date: Wed, 30 Oct 2024 22:16:17 +0530 Subject: [PATCH] ci: Fix release trigger workflow [release] --- .github/workflows/release.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3bd7f1a4..139f3f33 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Trigger release on: workflow_run: - workflows: [Docker] + workflows: [CI] types: [completed] branches: [master] workflow_dispatch: @@ -13,10 +13,24 @@ jobs: runs-on: ubuntu-latest if: ${{ github.event.workflow_run.conclusion == 'success' && github.repository == 'flathub-infra/flatpak-builder-lint' && github.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[release]') }} steps: + + - name: Check if docker-manifest succeeded + run: | + job_status=$(gh run view ${{ github.event.workflow_run.id }} --json jobs --jq '.jobs[] | select(.name=="docker-call / docker-manifest") | .conclusion') + echo "Status: $job_status" + + if [ "$job_status" == "success" ]; then + echo "RUN=true" >> "$GITHUB_ENV" + fi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Delay for 2 minutes + if: env.RUN == 'true' run: sleep 120 - name: Trigger workflow in org.flatpak.Builder repository + if: env.RUN == 'true' uses: peter-evans/repository-dispatch@v3 with: repository: flathub/org.flatpak.Builder @@ -25,6 +39,7 @@ jobs: token: ${{ secrets.LINTER_TRIGGER_WORKFLOW_TOKEN }} - name: Trigger workflow in flathub-infra/flatpak-github-actions + if: env.RUN == 'true' uses: peter-evans/repository-dispatch@v3 with: repository: flathub-infra/flatpak-github-actions