mirror of
https://github.com/danieldemus/openhab-addons
synced 2026-07-29 12:34:21 +02:00
[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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user