This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
.github/workflows/build-and-publish-hkt-day-lists.yml #209
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: | |
schedule: | |
# Explanation of the Cron Expression: | |
# `*/5`: Every 5 minutes. | |
# `6-8`: From 06:00 AM to 08:59 AM. | |
# `*`: Every day of the month. | |
# `*`: Every month. | |
# `1-5`: Monday to Friday. | |
# - cron: '*/5 6-8 * * 1-5' | |
# Explanation of the Cron Expression: | |
# `6,16,26,36,46,56`: At these minutes. | |
# `*`: Every hour. | |
# `*`: Every day of the month. | |
# `*`: Every month. | |
# `*`: Every weekday. | |
- cron: '6,16,26,36,46,56 * * * *' | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
jobs: | |
build-and-publish-hkt-day-lists: | |
name: Setup, build, and publish HKT day lists | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Python packages | |
run: pip install -r requirements.txt | |
- name: Install wkhtmltopdf | |
run: | | |
sudo apt-get update | |
sudo apt-get install wkhtmltopdf | |
- name: Build HKT day lists and upload them to Google Drive | |
env: | |
SERVICE_ACCOUNT_JSON_BASE64: ${{ secrets.SERVICE_ACCOUNT_JSON_BASE64 }} | |
id: build-hkt-day-lists | |
run: | | |
echo "$SERVICE_ACCOUNT_JSON_BASE64" | base64 --decode > /tmp/elternvertretung-b7713037bac6.json | |
python build-hkt-day-lists.py |