ci: fix update-website workflow (#19187)
* ci: fix update-website workflow * typo * remove nested echo * simplify
Ilya Mashchenko committed
Dec 12, 2024 at 11:07 UTC
5d4d2bc85f61fd1dc223ffec085ba6afb284077a
2 files changed
+15
-6
.github/workflows/generate-integrations.yml
+1
@@ -63,6 +63,7 @@ jobs:
63
commit-message: Regenerate integrations docs
64
branch: integrations-regen
65
title: Regenerate integrations docs
66
+ labels: integrations-update
67
body: |
68
Regenerate the integrations docs based on the
69
latest metadata yaml code.
.github/workflows/update-website.yml
+14
-6
@@ -1,18 +1,26 @@
1
name: Update website
2
on:
3
- push:
4
- branches:
5
- - master
6
- paths:
7
- - "integrations/integrations.json"
3
+ pull_request:
4
+ types: [closed]
5
concurrency:
6
group: website-trigger-${{ github.ref }}
7
cancel-in-progress: true
8
jobs:
9
trigger:
10
+ if: github.event.pull_request.merged == true &&
11
+ github.event.pull_request.base.ref == 'master' &&
12
+ github.repository == 'netdata/netdata'
13
runs-on: ubuntu-latest
14
- if: github.repository == 'netdata/netdata'
14
steps:
15
+ - name: Check Labels
16
+ id: label-check
17
+ run: |
18
+ LABELS='${{ toJSON(github.event.pull_request.labels) }}'
19
+ echo "Labels: $LABELS"
20
+ if [[ ! "$LABELS" =~ "integrations-update" ]]; then
21
+ echo "This PR does not have the required label."
22
+ exit 1
23
+ fi
24
- name: Trigger netdata/website update-integrations workflow
25
uses: benc-uk/workflow-dispatch@v1
26
with: