summaryrefslogtreecommitdiffstats
path: root/.github/workflows/dashboard-pr.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-19 12:33:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-19 12:33:27 +0000
commit841395dd16f470e3c051a0a4fff5b91efc983c30 (patch)
tree4115f6eedcddda75067130b80acaff9e51612f49 /.github/workflows/dashboard-pr.yml
parentAdding upstream version 1.30.1. (diff)
downloadnetdata-841395dd16f470e3c051a0a4fff5b91efc983c30.tar.xz
netdata-841395dd16f470e3c051a0a4fff5b91efc983c30.zip
Adding upstream version 1.31.0.upstream/1.31.0
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.yml47
1 files changed, 47 insertions, 0 deletions
diff --git a/.github/workflows/dashboard-pr.yml b/.github/workflows/dashboard-pr.yml
new file mode 100644
index 000000000..8f5a40f2b
--- /dev/null
+++ b/.github/workflows/dashboard-pr.yml
@@ -0,0 +1,47 @@
+---
+# 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.
+ name: Dashboard Version
+ required: true
+
+jobs:
+ dashboard-pr:
+ name: Generate Dashboard Version Bump PR
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Create Branch
+ # This is needed because we want to do a PR, and the commit
+ # action used below requires the branch it is commiting to to
+ # already exist.
+ run: |
+ git checkout -b dashboard-${{ github.event.inputs.dashboard_version }}
+ git push -u origin dashboard-${{ github.event.inputs.dashboard_version }}
+ - name: Update Files
+ run: |
+ web/gui/bundle_dashboard.py ${{ github.event.inputs.dashboard_version }}
+ - name: Commit Changes
+ uses: swinton/commit@v2.x
+ env:
+ GH_TOKEN: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
+ with:
+ files: |
+ packaging/dashboard.version
+ packaging/dashboard.checksums
+ commit-message: 'Update dashboard to version ${{ github.event.inputs.dashboard_version }}.'
+ ref: refs/heads/dashboard-${{ github.event.inputs.dashboard_version }}
+ - name: Create PR
+ uses: repo-sync/pull-request@v2
+ with:
+ source_branch: dashboard-${{ github.event.inputs.dashboard_version }}
+ pr_title: 'Update dashboard to version ${{ github.event.inputs.dashboard_version }}.'
+ pr_body: 'See https://github.com/netdata/dashboard/releases/tag/${{ github.event.inputs.dashboard_version }} for changes.'
+ github_token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}