Update ETH to EUR Data #35
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 ETH to EUR Data | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Runs at 00:00 UTC daily. | |
workflow_dispatch: | |
jobs: | |
fetch-and-update-data: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Install dependencies | |
run: npm install | |
- name: Update data.csv with latest ETH to EUR price | |
run: node job.mjs | |
- name: Commit and push if there are changes | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Action" | |
git add data.csv | |
git commit -m "Update data.csv with latest ETH to EUR price" -a || echo "No changes commit" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.PAT }} |