# This is a basic workflow to help you get started with Actions
#  Daily job at 04:05 GMT

name: Update EUR BTC rates
on:
  schedule:
   - cron:  '5 4 * * *'

jobs:
  run:
    name: update eurhistorical
    runs-on: ubuntu-latest
    steps:    
      - name: setup actions
        uses: actions/checkout@v4

      - name: Setup Node.js 22
        uses: actions/setup-node@v4
        with:
          node-version: '22'
          
      - name: add and push
        run: |
          npm install
          npm install axios@0.26.1 --save
          node updaterate.js
          date > generated.txt
          git config user.name github-actions
          git config user.email github-actions@github.com
          git add .
          git commit -m "generated"
          git push
    env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


