Skip to content

Update

Update #175

Workflow file for this run

name: Update
on:
repository_dispatch:
workflow_dispatch:
push:
paths:
- '.github/workflows/update.yml'
branches:
- main
schedule:
- cron: 0 16 * * *
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Submodule
run: sh update.sh
- name: Check for changes
id: check_changes
run: |
if git diff --quiet; then
echo "No changes detected"
echo "::set-output name=push_required::false"
else
echo "Changes detected"
echo "::set-output name=push_required::true"
fi
- name: Deploy
if: steps.check_changes.outputs.push_required == 'true'
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@github.com"
git add --all
git commit -m "$(date +'%Y-%m-%dT%H:%M:%S')"
git push