added full cli package and CI execution
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
name: Manual Full Sync
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
days:
|
||||
description: "Number of days to sync"
|
||||
required: true
|
||||
default: "30"
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
full-sync:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install uv
|
||||
run: |
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
uv sync
|
||||
|
||||
- name: Run full sync
|
||||
env:
|
||||
ELOVERBLIK_API_TOKEN: ${{ secrets.ELOVERBLIK_API_TOKEN }}
|
||||
DB_HOST: ${{ secrets.DB_HOST }}
|
||||
DB_NAME: ${{ secrets.DB_NAME }}
|
||||
DB_USER: ${{ secrets.DB_USER }}
|
||||
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
|
||||
DB_PORT: ${{ secrets.DB_PORT }}
|
||||
run: |
|
||||
uv run energy-ingester sync --days ${{ github.event.inputs.days }} --verbose
|
||||
|
||||
- name: Summary
|
||||
run: |
|
||||
echo "Full sync completed for ${{ github.event.inputs.days }} days!"
|
||||
|
||||
- name: Notify on failure
|
||||
if: failure()
|
||||
run: |
|
||||
echo "Full sync failed!"
|
||||
exit 1
|
||||
Reference in New Issue
Block a user