This is an automated email from the ASF dual-hosted git repository.
kunni pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-cdc.git
The following commit(s) were added to refs/heads/master by this push:
new c8e030f07 [pipeline] Use GHA workflow triggers to run labeler workflow
(#4274)
c8e030f07 is described below
commit c8e030f07e96e5ff7896764257cd3c09b07571e4
Author: yuxiqian <[email protected]>
AuthorDate: Thu Feb 26 14:12:52 2026 +0800
[pipeline] Use GHA workflow triggers to run labeler workflow (#4274)
---
.github/workflows/label.yml | 34 +++++++++++++++-------
.github/workflows/{label.yml => label_trigger.yml} | 19 ++----------
2 files changed, 26 insertions(+), 27 deletions(-)
diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml
index b87a3b4c2..d53a389a6 100644
--- a/.github/workflows/label.yml
+++ b/.github/workflows/label.yml
@@ -16,26 +16,38 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
-# To use this workflow, you will need to set up a .github/label.yml
+# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler
name: Labeler
+
on:
- pull_request:
- branches:
- - master
- - release-*
+ workflow_run:
+ workflows: [Labeler-Trigger]
+ types: [requested]
+
+permissions:
+ checks: write
+ contents: read
+ pull-requests: write
jobs:
label:
-
runs-on: ubuntu-latest
- permissions:
- contents: read
- pull-requests: write
-
steps:
+ - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
+ uses: actions/checkout@v6
+ with:
+ persist-credentials: false
+ submodules: recursive
+ - name: "Get information about the original trigger of the run"
+ uses: ./.github/actions/get-workflow-origin
+ id: source-run-info
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ sourceRunId: ${{ github.event.workflow_run.id }}
- uses: actions/labeler@v6
with:
- repo-token: "${{ secrets.GITHUB_TOKEN }}"
\ No newline at end of file
+ repo-token: "${{ secrets.GITHUB_TOKEN }}"
+ pr-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
diff --git a/.github/workflows/label.yml b/.github/workflows/label_trigger.yml
similarity index 66%
copy from .github/workflows/label.yml
copy to .github/workflows/label_trigger.yml
index b87a3b4c2..fb6a8822e 100644
--- a/.github/workflows/label.yml
+++ b/.github/workflows/label_trigger.yml
@@ -13,14 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# This workflow will triage pull requests and apply a label based on the
-# paths that are modified in the pull request.
-#
-# To use this workflow, you will need to set up a .github/label.yml
-# file with configuration. For more information, see:
-# https://github.com/actions/labeler
-
-name: Labeler
+name: Labeler-Trigger
on:
pull_request:
branches:
@@ -29,13 +22,7 @@ on:
jobs:
label:
-
runs-on: ubuntu-latest
- permissions:
- contents: read
- pull-requests: write
-
steps:
- - uses: actions/labeler@v6
- with:
- repo-token: "${{ secrets.GITHUB_TOKEN }}"
\ No newline at end of file
+ - name: "Do nothing. Just triggers corresponding workflow."
+ run: echo
\ No newline at end of file