.github/workflows/updateall.yml #5
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
on: | |
# https://crontab.guru/#0_10,22_*_*_* | |
schedule: | |
- cron: '0 8 * * *' | |
#- cron: '0 10,22 * * *' | |
workflow_dispatch: | |
inputs: | |
print_tags: | |
description: 'True to print to STDOUT' | |
required: false | |
type: boolean | |
jobs: | |
sync-notion: | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
#if: ${{ inputs.print_tags }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v3 | |
- name: Update all refs | |
run: ./updateall.sh | |
- name: Add all to git | |
run: git add -A | |
- name: Commit & Push changes | |
uses: actions-js/push@156f2b10c3aa000c44dbe75ea7018f32ae999772 # https://github.com/actions-js/push/releases/tag/v1.4 | |
with: | |
branch: main | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
message: 'chore: update existing repos ${date}' |