Skip to content

scheduled-check-update #13348

scheduled-check-update

scheduled-check-update #13348

Workflow file for this run

name: scheduled-check-update
on:
workflow_dispatch:
#
schedule:
# check every 30 minutes
- cron: '30 * * * *'
jobs:
timed_update:
runs-on: ubuntu-latest
steps:
-
name: Action Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GHTK }} # use personal token to trigger action when push
-
name: Run script
id: update
uses: actions/github-script@v6
with:
script: |
const script = require('./.github/script/timed_update.js')
return await script({github, context})
-
name: Commit
run: |
echo "Result: ${{steps.update.outputs.result}}"
if [[ "${{steps.update.outputs.result}}" == true ]]; then
git config user.name github-actions && \
git config user.email github-actions[bot]@users.noreply.github.com && \
git add . && \
git commit -m 'github action generated' && \
git push && \
echo 'Done'
fi