[GHA] Fix rebuild using label rebuild (#18629)

* Implement rebuild in ci_build workflow to make PR validation pass
* Remove label rebuild at the end of the workflow

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
Holger Friedrich
2025-05-01 08:53:53 +02:00
committed by GitHub
parent 4e2278d3e0
commit e349609ba7
2 changed files with 10 additions and 13 deletions
+10 -1
View File
@@ -11,11 +11,12 @@ on:
- 'main'
paths-ignore:
- '.github/**/*.md'
types: [opened,synchronize,reopened,labeled]
workflow_dispatch:
workflow_call:
jobs:
build:
if: ${{ (github.event_name == 'pull_request' && github.event.action != 'labeled') || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'rebuild' }}
strategy:
fail-fast: false
matrix:
@@ -122,3 +123,11 @@ jobs:
run: |
echo "::error::Files have changed: $CHANGED_FILES"
exit 1
- name: Remove Label
if: ${{ always() && github.event.label.name == 'rebuild' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR: ${{ github.event.number }}
run: |
gh pr edit $PR --remove-label rebuild
-12
View File
@@ -1,12 +0,0 @@
# This workflow triggers the ci_build workflow when a pull request
# is labeled with 'rebuild'.
name: Trigger ci_build on label
on:
pull_request:
types: [labeled]
jobs:
trigger-build:
if: ${{ github.event.label.name == 'rebuild' }}
uses: ./.github/workflows/ci-build.yml