Skip to content

Report Update

Report Update #24

Workflow file for this run

name: Report Update
on:
schedule:
- cron: "0 4 1 * *" # 1:00 AM UTC -3 on the first day of the month
workflow_dispatch:
inputs:
month:
description: 'Month to generate the report'
required: true
default: last_month
jobs:
generate-report:
name: "🚀 Report Generate"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Poetry install
run: poetry install --no-dev --no-root
- name: "🤫 Secret"
run: |
echo ${SERVICE_ACCOUNT_CREDENTIALS} > service_account.json
env:
SERVICE_ACCOUNT_CREDENTIALS: ${{ secrets.SERVICE_ACCOUNT_CREDENTIALS }}
- name: Run report
run: |
poetry run python main.py ${{secrets.PROPERTY_ID}} $(bash calculate_dates.sh ${{ github.event.inputs.month }})
env:
PROPERTY_ID: ${{ secrets.PROPERTY_ID }}
- name: Commit and push changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "Codaqui Bot"
git add .
git commit -m "Update report for $(bash calculate_dates.sh ${{ github.event.inputs.month }})"
git push origin HEAD:main