Skip to content

Commit 6e1ad0d

Browse files
[GHA] Allow rebuild using label rebuild (openhab#4739)
* This restores functionality we had before we migrated the PR builds to GitHub Actions. * 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>
1 parent a65b9a4 commit 6e1ad0d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/ci-build.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ on:
1111
- 'main'
1212
paths-ignore:
1313
- '.github/**/*.md'
14+
types: [opened,synchronize,reopened,labeled]
1415
workflow_dispatch:
1516

1617
jobs:
1718
build:
19+
if: ${{ (github.event_name == 'pull_request' && github.event.action != 'labeled') || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'rebuild' }}
1820
strategy:
1921
fail-fast: false
2022
matrix:
@@ -181,3 +183,11 @@ jobs:
181183
title: CheckStyle Violations
182184
path: '**/checkstyle-result.xml'
183185
mode: inline
186+
187+
- name: Remove Label
188+
if: ${{ always() && github.event.label.name == 'rebuild' }}
189+
env:
190+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
191+
PR: ${{ github.event.number }}
192+
run: |
193+
gh pr edit $PR --remove-label rebuild

0 commit comments

Comments
 (0)