.github/workflows/update-variants.yml #94
This file contains 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 JSON Variants | |
on: | |
workflow_dispatch: | |
schedule: | |
# This code triggers the workflow every 12 h | |
- cron: "0 */12 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18" # or your desired version | |
- name: Install dependencies | |
run: npm install | |
- name: Run the script | |
run: npx ts-node src/updateVariants.ts | |
- name: Commit and push changes | |
run: | | |
git config --local user.email ${{secrets.email}} | |
git config --local user.name ${{secrets.name}} | |
git add -A | |
git commit -m "Update JSON variants" || echo "No changes to commit" | |
git push |