From 95d888b2af23b8bdff5018ae3c0c03cb915ea4cb Mon Sep 17 00:00:00 2001 From: ShaharNaveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Fri, 14 Nov 2025 12:00:01 +0200 Subject: [PATCH] Native triggers for workflow dependency --- .github/workflows/ci.yaml | 4 ++-- .github/workflows/pr-auto-commit.yaml | 25 +++++++------------------ 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 02afeff5713..0119a898f4f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,3 +1,5 @@ +name: CI + on: push: branches: [main, release] @@ -6,8 +8,6 @@ on: merge_group: workflow_dispatch: -name: CI - # Cancel previous workflows if they are the same workflow on same ref (branch/tags) # with the same event (push/pull_request) even they are in progress. # This setting will help reduce the number of duplicated workflows. diff --git a/.github/workflows/pr-auto-commit.yaml b/.github/workflows/pr-auto-commit.yaml index 8546c2abe51..27c84069810 100644 --- a/.github/workflows/pr-auto-commit.yaml +++ b/.github/workflows/pr-auto-commit.yaml @@ -1,12 +1,11 @@ name: PR Auto-format -# This workflow triggers when a PR is opened/updated on: - pull_request_target: - types: [opened, synchronize, reopened] - branches: - - main - - release + workflow_run: + workflows: + - CI + types: + - completed concurrency: group: pr-fmt-${{ github.event.pull_request.number }} @@ -15,6 +14,8 @@ concurrency: jobs: auto_format: if: | + github.event_name == 'pull_request' && + github.event.workflow_run.conclusion == 'success' && !contains(github.event.pull_request.labels.*.name, 'skip:ci') && !contains(github.event.pull_request.head.sha, '[skip ci]') permissions: @@ -33,18 +34,6 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} fetch-depth: 0 - # Wait for all PR check runs to complete - - name: Wait for all checks to complete - uses: poseidon/wait-for-status-checks@v0.6.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - delay: 60 - interval: 30 - timeout: 7200 - - - name: CI completed successfully - run: echo "CI workflow completed successfully - proceeding with auto-format" - - name: Setup Rust uses: dtolnay/rust-toolchain@stable with: