Update tables.js #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update tables.js | |
| on: | |
| push: | |
| branches: ["master"] | |
| workflow_dispatch: | |
| jobs: | |
| update-tables: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: tables.js | |
| run: | | |
| echo "export const tableList = [" > tables.js | |
| find table -type f -name '*.js' | sed 's|table/||' | sed 's|\.js$||' | sed 's|^| "|;s|$|",|' >> tables.js | |
| echo "];" >> tables.js | |
| - name: Commit | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@github.com" | |
| git add tables.js | |
| git diff --cached --quiet || git commit -m "Atualiza tables.js automaticamente" | |
| git push |