Skip to content

Commit 77bb145

Browse files
authored
Create update-tables.yml
1 parent 1b5bb15 commit 77bb145

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Update tables.js
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
workflow_dispatch:
7+
8+
jobs:
9+
update-tables:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
16+
- name: tables.js
17+
run: |
18+
echo "export const tableList = [" > tables.js
19+
find table -type f -name '*.js' | sed 's|table/||' | sed 's|\.js$||' | sed 's|^| "|;s|$|",|' >> tables.js
20+
echo "];" >> tables.js
21+
22+
- name: Commit
23+
run: |
24+
git config user.name "github-actions"
25+
git config user.email "github-actions@github.com"
26+
git add tables.js
27+
git diff --cached --quiet || git commit -m "Atualiza tables.js automaticamente"
28+
git push

0 commit comments

Comments
 (0)