name: daily imagedl check on: schedule: - cron: "0 1 * * *" workflow_dispatch: {} permissions: contents: write jobs: check-imagedl: runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.10" - name: Install dependencies run: | python -m pip install --upgrade pip pip install git+https://github.com/CharlesPikachu/imagedl.git@main # env: # SOME_API_KEY: ${{ secrets.SOME_API_KEY }} - name: Run imagedl daily check run: | python scripts/quick_check_imagedl.py - name: Commit and push daily_test_results env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }} AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} run: | git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git add daily_test_results if git diff --cached --quiet; then echo "No changes to commit" else git commit -m "Update imagedl check $(date -u '+%Y-%m-%d %H:%M:%S')" --author="${AUTHOR_NAME} <${AUTHOR_EMAIL}>" git push fi