Random Cron #3758
This file contains hidden or 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: Random Cron | |
| on: | |
| workflow_run: | |
| workflows: ["刷步数"] | |
| types: | |
| - completed | |
| workflow_dispatch: | |
| jobs: | |
| repo-sync: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 3 | |
| if: github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.STEP_PAT }} | |
| - name: random cron | |
| run: | | |
| source cron_convert.sh | |
| echo "configed CRON_HOURS ${{ vars.CRON_HOURS }}" | |
| persist_execute_log ${{ github.event_name }} ${{ vars.CRON_HOURS }} | |
| git config user.name cronwong | |
| git config user.email cronwong@wong.com | |
| git add . | |
| current=`TZ=Asia/Shanghai date '+%Y-%m-%d %H:%M:%S'` | |
| git commit -m "[${current}] random cron trigger by ${{ github.event_name }}" | |
| git push origin main |