Update Orders #190
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 Orders | |
on: | |
workflow_dispatch: | |
schedule: | |
# This code triggers the workflow every hour at minute 27 | |
- cron: "27 * * * *" | |
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" | |
- name: Install dependencies | |
run: npm install | |
- name: Run the script | |
run: npx ts-node src/updateOrders.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 |