From f33284d3050b3d024eac127ed7cac83f60ab6771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9lder=20Greg=C3=B3rio?= Date: Thu, 22 Oct 2026 21:53:10 +0100 Subject: [PATCH] MINOR: [CI] Avoid duplicate push and pull request runs Feature branches with an open pull request currently launch Dev, Test, Integration and RC on both push and pull_request. Limit push builds to main and add workflow_dispatch so maintainers can still validate another branch manually. Keep PR filters, release-tag triggers and the existing test matrices. Align documentation publishing with the main-only push trigger. --- .github/workflows/dev.yml | 5 +++-- .github/workflows/integration.yml | 4 ++-- .github/workflows/rc.yml | 19 ++++--------------- .github/workflows/test.yml | 4 ++-- 4 files changed, 11 insertions(+), 21 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index f4dc9ad6f1..3c574dc06e 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -20,8 +20,9 @@ name: Dev on: pull_request: {} push: - branches-ignore: - - dependabot/** + branches: + - main + workflow_dispatch: concurrency: group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }} diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 4120e5321c..e5ba59dcc8 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -20,8 +20,7 @@ name: Integration on: push: branches: - - '**' - - '!dependabot/**' + - main tags: - '**' paths: @@ -45,6 +44,7 @@ on: - 'format/**' - 'testing/data/**' - 'vector/**' + workflow_dispatch: concurrency: group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml index 2af245805d..7798d5bf6c 100644 --- a/.github/workflows/rc.yml +++ b/.github/workflows/rc.yml @@ -19,11 +19,11 @@ name: RC on: push: branches: - - "**" - - "!dependabot/**" + - main tags: - "*-rc*" pull_request: + workflow_dispatch: schedule: - cron: "0 0 * * *" concurrency: @@ -458,19 +458,8 @@ jobs: path: html.tar.gz publish-docs: name: Publish docs - # Run only when: - # * We push to a branch - # * If the target repository is apache/arrow-java: - # * The target branch is main - # * Else (fork repositories): - # * All branches - # * We can preview the last pushed content - # at https://${YOUR_GITHUB_ACCOUNT}.github.io/arrow-java/main/ - if: >- - github.event_name == 'push' && - github.ref_type == 'branch' && - ((github.repository == 'apache/arrow-java' && github.ref_name == 'main') || - github.repository != 'apache/arrow-java') + # Publish the main branch in both upstream and fork repositories. + if: github.event_name == 'push' && github.ref == 'refs/heads/main' needs: - docs runs-on: ubuntu-latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b9cd01a770..ae9adfc307 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,11 +20,11 @@ name: Test on: push: branches: - - '**' - - '!dependabot/**' + - main tags: - '**' pull_request: + workflow_dispatch: concurrency: group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}