ScottHanson.DE Savin it up for Friday night 🎵

Push an Outline with Github Actions

I've never worked with Github Actions before, but when thinking about how to push an outline from Drummer to GitHub I thought I'd take a look.

Actions are in YAML files saved in a special directory .github/workflowsin your repository. They can run when something happens in the repository (like a push or a pull request) or can be triggered externally (with an API call). The action starts a virtual machine, runs commands, then shuts down.

Fetching an outline from Drummer and committing it to the repository was pretty easy...

name: fetch-opml
on: [workflow_dispatch]
    runs-on: ubuntu-latest
      - uses: actions/checkout@v2
      - shell: bash
          run: |
            git config --global "GitHub Action"
            git config --global ""
            curl -o papascott-de.opml
            git add papascott-de.opml
            git commit -m "Fetched at `date`" --allow-empty
            git push origin main

NB: This post was written in Markdown, not Drummer, since I don't know yet how to render code blocks from OPML. Still diggin'!