Skip to content

Update fetch.yml

Update fetch.yml #28

Workflow file for this run

name: Fetch exchange rates v2
on:
workflow_dispatch:
schedule:
- cron: '00 18 * * *'
push:
branches:
- exchange-rates
env:
APP_ID: ${{ secrets.APP_ID }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
ref: exchange-rates
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install requests
#- name: Run fetch-rates.py script
#run: python fetch-rates.py
- name: Fetch fiat
run: curl -X GET "https://openexchangerates.org/api/latest.json?app_id=${{secrets.APP_ID}}" --output core/data/src/main/assets/fiat-rates.json
- name: print secret
run: echo ${{secrets.APP_ID}}
- name: print to debug
run: cat core/data/src/main/assets/fiat-rates.json
#- name: Move JSON file to assets directory
#run: mv crypto-rates.json core/data/src/main/assets/

Check failure on line 51 in .github/workflows/fetch.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/fetch.yml

Invalid workflow file

You have an error in your yaml syntax on line 51
- name: Push into Git
run: |-
git config --global user.email "[email protected]"
git config --global user.name "ARK Builders Bot"
git add core/data/src/main/assets/fiat-rates.json
# git add core/data/src/main/assets/crypto-rates.json
git commit -m "Automated update of rates" || echo "Nothing to commit"
git pull origin exchange-rates --no-edit
git push origin exchange-rates