Skip to content

run coinranking api #19

run coinranking api

run coinranking api #19

Workflow file for this run

name: run coinranking api
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v4 # checkout the repository content to github runner
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.10' # install the python version needed
- name: install python packages
run: |
python -m pip install --upgrade pip
pip install pipenv
env:
PIPENV_VENV_IN_PROJECT: "true"
- name: Set PIPENV_PYTHON
run: echo "PIPENV_PYTHON=$(python -c 'import sys; print(sys.executable)')" >> $GITHUB_ENV
- name: Install Dependencies
run: pipenv install
- name: Create ETL Processing Path
run: mkdir home/runner/work/crypto_etl_project/crypto_etl_project/Data/FilesForProcessing
- name: Create ETL Archive Path
run: mkdir home/runner/work/crypto_etl_project/crypto_etl_project/Data/Archive
- name: execute py script # run main.py
env:
API_KEY: ${{ secrets.API_KEY }}
CRYPTO_RANKING_URI: ${{ secrets.CRYPTO_RANKING_URI }}
API_LIMIT: ${{ secrets.API_LIMIT }}
SNOWFLAKE_USERNAME: ${{ secrets.SNOWFLAKE_USERNAME }}
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
SNOWFLAKE_IDENTIFIER: ${{ secrets.SNOWFLAKE_IDENTIFIER }}
INTERNAL_STAGE: ${{ secrets.INTERNAL_STAGE }}
run: pipenv run python main.py
- name: commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -A
git diff-index --quiet HEAD || (git commit -a -m "add files" --allow-empty)
- name: push changes
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main