Skip to content

Update schedule

Update schedule #829

name: Update schedule
on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "22 */2 * * *"
jobs:
check:
runs-on: ubuntu-latest
outputs:
build-required: ${{ steps.add-and-commit.outputs.pushed }}
build-sha: ${{ steps.add-and-commit.outputs.commit_long_sha }}
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: poetry
cache-dependency-path: scripts/poetry.lock
- run: |
cd scripts
poetry install
poetry run python schedule_sync.py
env:
PRETALX_TOKEN: ${{ secrets.PRETALX_TOKEN }}
- run: git diff
- uses: EndBug/add-and-commit@v9
id: add-and-commit
with:
add: 'public/people src/content/sessions src/content/people src/content/_people_etags.yml src/content/breaks'
author_name: Robot
author_email: beep-boop@local
message: "Auto-update of schedule"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Notify discord
# if: steps.add-and-commit.outputs.committed == 'true'
# uses: th0th/[email protected]
# env:
# DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
# GITHUB_ACTOR: ${{ github.actor }}
# GITHUB_JOB_NAME: "Update schedule"
# GITHUB_JOB_STATUS: ${{ job.status }}
build:
needs: check
if: ${{ needs.check.outputs.build-required == 'true' }}
uses: ./.github/workflows/build.yml
with:
sha: ${{ needs.check.outputs.build-sha }}