summaryrefslogtreecommitdiffstats
path: root/.github/workflows/dashboard-pr.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:57:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:57:58 +0000
commitbe1c7e50e1e8809ea56f2c9d472eccd8ffd73a97 (patch)
tree9754ff1ca740f6346cf8483ec915d4054bc5da2d /.github/workflows/dashboard-pr.yml
parentInitial commit. (diff)
downloadnetdata-be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97.tar.xz
netdata-be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97.zip
Adding upstream version 1.44.3.upstream/1.44.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github/workflows/dashboard-pr.yml')
-rw-r--r--.github/workflows/dashboard-pr.yml54
1 files changed, 54 insertions, 0 deletions
diff --git a/.github/workflows/dashboard-pr.yml b/.github/workflows/dashboard-pr.yml
new file mode 100644
index 00000000..f02cfb69
--- /dev/null
+++ b/.github/workflows/dashboard-pr.yml
@@ -0,0 +1,54 @@
+---
+# Create a PR to update the react dashboard code.
+name: Dashboard Version PR
+
+on:
+ workflow_dispatch:
+ inputs:
+ dashboard_version:
+ # This must be specified, and must _exactly_ match the version
+ # tag for the release to be used for the update.
+ description: Dashboard Version
+ required: true
+
+env:
+ DISABLE_TELEMETRY: 1
+
+jobs:
+ dashboard-pr:
+ name: Generate Dashboard Version Bump PR
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ id: checkout
+ uses: actions/checkout@v4
+ - name: Update Files
+ id: update
+ run: |
+ web/gui/bundle_dashboard_v1.py ${{ github.event.inputs.dashboard_version }}
+ - name: Create Pull Request
+ id: pr
+ uses: peter-evans/create-pull-request@v5
+ with:
+ title: 'Update dashboard to version ${{ github.event.inputs.dashboard_version }}.'
+ body: 'See https://github.com/netdata/dashboard/releases/tag/${{ github.event.inputs.dashboard_version }} for changes.'
+ branch: dashboard-${{ github.event.inputs.dashboard_version }}
+ branch-suffix: timestamp
+ delete-branch: true
+ commit-message: 'Update dashboard to version ${{ github.event.inputs.dashboard_version }}.'
+ token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
+ - name: Failure Notification
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_COLOR: 'danger'
+ SLACK_FOOTER: ''
+ SLACK_ICON_EMOJI: ':github-actions:'
+ SLACK_TITLE: 'Dashboard update PR creation failed:'
+ SLACK_USERNAME: 'GitHub Actions'
+ SLACK_MESSAGE: |-
+ ${{ github.repository }}: Failed to create PR to update dashboard code to newest release.
+ Checkout: ${{ steps.checkout.outcome }}
+ Update files: ${{ steps.update.outcome }}
+ Create PR: ${{ steps.pr.outcome }}
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
+ if: failure()