Skip to content

Fetch and Commit Prices #7

Fetch and Commit Prices

Fetch and Commit Prices #7

Workflow file for this run

name: Fetch and Commit Prices
on:
schedule:
# Runs at 00:00 UTC on the 13th of every month
- cron: '0 0 13 * *'
workflow_dispatch:
jobs:
fetch_prices:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Go environment
uses: actions/setup-go@v2
with:
go-version: '^1.21'
- name: Download osmosisd binary
run: |
wget $(curl -s https://api.github.com/repos/osmosis-labs/osmosis/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep 'linux-amd64') -O osmosisd
chmod +x osmosisd
sudo mv osmosisd /usr/local/bin/
- name: Fetch Prices
env:
OSMOSIS_RPC: ${{ vars.OSMOSIS_RPC }}
run: |
go run main.go fetch-prices
- name: Commit and Push Prices File
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add prices/
git commit -m "Automated prices update"
git push
- name: Trigger calculate-grant workflow
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
event-type: calculate-grant-trigger