-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.27 KB
/
plotly-resources.yaml
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
37
38
39
40
41
42
43
44
45
46
47
name: Update plotly resource jsons
env:
USERNAME: ${{ github.actor }}
ADDRESS_SUFFIX: users.noreply.github.com
permissions:
contents: write
on:
push:
branches:
- master
workflow_dispatch:
jobs:
pull:
runs-on: ubuntu-latest
steps:
- name: Checkout plotly-gtk
uses: actions/checkout@v4
- name: Checkout plotly.js
uses: actions/checkout@v4
with:
repository: plotly/plotly.js
path: _resources/plotly.js
- name: Checkout plotly.py
uses: actions/checkout@v4
with:
repository: plotly/plotly.py
path: _resources/plotly.py
- name: Update resources
run: |
cp _resources/plotly.js/dist/plot-schema.json src/plotly_gtk/utils
cp -r _resources/plotly.py/packages/python/plotly/plotly/package_data/templates src/plotly_gtk/utils
- name: Check if resources have been updated
run: |
if git diff --quiet; then
echo "No changes detected. Exiting."
echo "no_changes=true" >> $GITHUB_ENV
fi
- name: Commit and push
if: env.no_changes != 'true'
run: |
git config user.name "$USERNAME"
git config user.email "$USERNAME@$ADDRESS_SUFFIX"
git commit -a -m "Update plotly resources"
git push