gh actions event files

this is a repo to test GitHub actions' event files and github context. there is little documentation surrounding the syntax for these data. this is a debug and exploration solution that is far easier (and less expensive) to work with than using something like mxschmitt/action-tmate to ssh into a running action and checking out the workflow event/context from there.

What are GitHub Actions event files and context?

Two (kinda) separate things:
  1. event file

    • this file contains details on why the action ran and repo conditions at the time of it’s run

    • event files are found by using $GITHUB_EVENT_PATH. it is a json file

    • as far as I can find, there exists no documentation for the syntax of this file

    • seems like this file is the output from the api responses, but I cannot find exactly where

  2. github context

Note
be very careful here, the github context contains a sensitive token that allows read/write permissions to your repository. it lives in github.token and $GITHUB_TOKEN. do not expose this publicly or people (or bots) will do very bad things to your repo.

How does this repo help solve the event file syntax problem?

this workflow file is an action that will save all event files into the workflow-data branch of this repository. it includes most all documented triggers so that it runs on almost any repo action. this folder contains all the event files and context for all runs of the mentioned workflow file.

there is still a lot of work to be done, this repo does not yet provide a good syntax reference for the event files, but it does have examples for a few repo triggers.