Sungrow Data #6854
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: Sungrow Data | |
# Run workflow every day at 4:00 AM UTC or run manually | |
on: | |
schedule: | |
- cron: "15 3-21 * * *" # Runs every hour between 5:00 and 23:00 CEST (UTC+2) | |
workflow_dispatch: # Allows manual triggering as well | |
permissions: | |
contents: write | |
env: | |
GLOBAL_DOTNET_VERSION: '9.0.x' | |
GLOBAL_COMMAND: 'Sungrow' | |
jobs: | |
# scan: | |
# name: gitleaks | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# with: | |
# fetch-depth: 0 | |
# - uses: gitleaks/gitleaks-action@v2 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
Run-Data: | |
# needs: scan | |
# use ubuntu-latest|self-hosted image to run steps on | |
runs-on: ubuntu-24.04-arm # ubuntu-latest | |
steps: | |
- name: Before Run Actions | |
uses: sujithq/myenergy/.github/actions/before-run-actions@b2c05091b1eaf2af63e10ed6ebea06c0d300e9df | |
with: | |
DOTNET-VERSION: ${{ env.GLOBAL_DOTNET_VERSION }} | |
- name: Run ${{ env.GLOBAL_COMMAND }} Data | |
run: | | |
dotnet run --project src/June.Data -c Release --no-build --no-restore ${{ env.GLOBAL_COMMAND }} run | |
env: | |
NETCORE_ENVIRONMENT: Production | |
SUNGROW_ACCESS_KEY: ${{ secrets.SUNGROW_ACCESS_KEY }} | |
SUNGROW_APP_KEY: ${{ secrets.SUNGROW_APP_KEY }} | |
SUNGROW_APP_RSA_PUBLIC_KEY: ${{ secrets.SUNGROW_APP_RSA_PUBLIC_KEY }} | |
SUNGROW_PASSWORD: ${{ secrets.SUNGROW_PASSWORD }} | |
SUNGROW_PS_ID: ${{ secrets.SUNGROW_PS_ID }} | |
- name: After Run Actions | |
uses: sujithq/myenergy/.github/actions/after-run-actions@d1d1ca875a3d7610e203a3a6d6140cf0620f1b2e | |
with: | |
COMMAND: ${{ env.GLOBAL_COMMAND }} | |
APP_ID: ${{ secrets.APP_ID }} | |
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} |