This GitHub action provides the functionality to:
- Automatically fetch events from a given TimeEdit calendar and output the calendar events in a markdown file as formatted markdown content.
- The script places content within a set area indicated by dynamic content tags.
Should the tags be missing, then no action will be taken.
The following flowchart illustrates the GitHub action workflow.
A minimal working example could look like the following,
name: Update TimeEdit schedule
on:
schedule:
- cron: '30 6 * * *'
jobs:
fetch-timeedit-events:
runs-on: ubuntu-latest
steps:
- name: Update schedule Action
uses: EdmanJohan/schedule-update-action@master
with:
timeedit-url: https://cloud.timeedit.net/kth/web/public01/
course-name: dd2482
repo-name: devops-course
repo-owner: EdmanJohan
repo-file: README.md
filter-empty: true
use-kth-places: true
Then, place the following tags in the markdown file to indicate where the
content should be inserted.
<!-- start dynamic schedule content -->
<!-- end dynamic schedule content -->
Required The url of the TimeEdit site to use. E.g. https://cloud.timeedit.net/kth/web/public01/
Required The name of the course to fetch events for. E.g. DD2482
Optional Repository owner where file to update resides. Defaults to current context.
Optional Repository name where file to update resides. Defaults to current context.
Optional Full name of file to update. Defaults to README.md
.
Required GitHub token to interact with API. Default github.token
Optional Boolean value to indicate whether empty events should be filtered. Default true
Optional Boolean value to indicate whether to replace locations with KTH Places links. Default `false´
The GitHub aciton utilizies the simple-timeedit-api package, that was developed in conjunction with this.
The source code is available in the corresponding repository.
Due to the fact that TimeEdit deletes events that have passed, and the action
itself does not maintain memory, old events will simply be deleted as time passes.