ci: restrict workflow to main branch PRs (#4677)

This pull request updates GitHub Actions workflow configuration files to
ensure that automated checks and labeling only run for pull requests
targeting specific branches, primarily `main`. This helps prevent
workflows from running unnecessarily on other branches and tightens
control over automation.

Workflow branch targeting updates:

* Updated `.github/workflows/auto-labelerV2.yml` to trigger the Auto
Pull Request Labeler V2 workflow only when pull requests target the
`main` or `V2` branches.
* Updated `.github/workflows/check_properties.yml` to trigger the check
only for pull requests targeting the `main` branch.

Workflow execution condition:

* Added a condition to the `check-files` job in
`.github/workflows/check_properties.yml` so it only runs if the pull
request's base branch is `main`.
This commit is contained in:
Ludy 2025-10-16 23:39:07 +02:00 committed by GitHub
parent 347aaba8b4
commit 4ef2e4ab79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -2,6 +2,9 @@ name: "Auto Pull Request Labeler V2"
on:
pull_request_target:
types: [opened, synchronize]
branches:
- main
- V2
permissions:
contents: read

View File

@ -5,6 +5,8 @@ on:
types: [opened, synchronize, reopened]
paths:
- "app/core/src/main/resources/messages_*.properties"
branches:
- main
# cancel in-progress jobs if a new job is triggered
# This is useful to avoid running multiple builds for the same branch if a new commit is pushed