Skip to content

Python application

Python application #44

Workflow file for this run

name: Python application
on:
schedule:
- cron: "0 13 * * *"
push:
branches:
- master
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Generate .env file
run: |
echo "SLACK_BOT_TOKEN=${{ secrets.SLACK_BOT_TOKEN }}" >> .env
echo "SLACK_CHANNEL_ID=${{ secrets.SLACK_CHANNEL_ID }}" >> .env
echo "KEY_PATH=${{ secrets.KEY_PATH }}" >> .env
echo "PROJECT_ID=${{ secrets.PROJECT_ID }}" >> .env
echo "DATASET_ID=${{ secrets.DATASET_ID }}" >> .env
- name: Create BigQuery key json file
id: Create-BigQuery-key-json-file
uses: jsdaniell/[email protected]
with:
name: "key.json"
json: ${{ secrets.BIGQUERY_KEY_JSON }}
- name: Run main.py
run: |
python src/main.py