Giter Club home page Giter Club logo

schedule-update-action's Introduction

Schedule update action

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.

GitHub Action flowchart

Getting started

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 -->

Inputs

timeedit-url

Required The url of the TimeEdit site to use. E.g. https://cloud.timeedit.net/kth/web/public01/

course-name

Required The name of the course to fetch events for. E.g. DD2482

repo-owner

Optional Repository owner where file to update resides. Defaults to current context.

repo-name

Optional Repository name where file to update resides. Defaults to current context.

repo-file

Optional Full name of file to update. Defaults to README.md.

token

Required GitHub token to interact with API. Default github.token

filter-empty

Optional Boolean value to indicate whether empty events should be filtered. Default true

use-kth-places

Optional Boolean value to indicate whether to replace locations with KTH Places links. Default `false´

External Packages

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.

Limitations

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.