Skip to content

Token Prices Automation #1

Token Prices Automation

Token Prices Automation #1

Workflow file for this run

# .github/workflows/app.yaml
name: Token Prices Automation
on:
workflow_dispatch:
pull_request:
paths:
- 'models/prices/*/*.sql'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
token-prices-test:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Fetch base commit
run: git fetch origin ${{ github.event.pull_request.base.sha }}
- name: Fetch head commit
run: git fetch origin ${{ github.event.pull_request.head.sha }}
- name: Get prices diff
shell: bash
run: |
git diff ${{ github.event.pull_request.base.sha}}..${{ github.event.pull_request.head.sha }} models/prices/**/*.sql | grep '^\+ ' > scripts/new_lines.txt
- name: Run validations
id: validations
run: python scripts/check_tokens.py --file_name scripts/new_lines.txt