Update data in database #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update data in database | |
on: | |
workflow_dispatch: | |
jobs: | |
update_data: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install heroku-cli | |
run: curl https://cli-assets.heroku.com/install-ubuntu.sh | sh | |
- name: Install dependencies | |
run: | | |
npm ci | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -e . | |
- name: Validate config | |
run: ./validate_config.py | |
- uses: akhileshns/[email protected] | |
with: | |
heroku_api_key: ${{secrets.HEROKU_API_KEY}} | |
heroku_app_name: "openerz" | |
heroku_email: ${{secrets.HEROKU_EMAIL}} | |
justlogin: true | |
- name: Get DATABASE_URL from heroku | |
run: | | |
dburl=$(heroku config:get DATABASE_URL -a openerz) | |
echo "DATABASE_URL=${dburl}" >> "$GITHUB_ENV" | |
- name: Update database | |
run: ./load_data_in_database.sh |