summaryrefslogtreecommitdiffstats
path: root/.github/workflows/dashboard-pr.yml
blob: 711cf1e1f6f228d6cb00350277a97dcc4dd5c6b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
# 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:
  DO_NOT_TRACK: 1

jobs:
  dashboard-pr:
    name: Generate Dashboard Version Bump PR
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Update Files
        run: |
          web/gui/bundle_dashboard.py ${{ github.event.inputs.dashboard_version }}
      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v3
        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 }}