Quick example demonstrating how to get information about a job run from an action.
The code for the action is in .github/actions/job_url
. Currently it just prints the HTML URL of the running action,
but that is to demonstrate how to get job-run specific information using the GitHub API.
The calling workflow is in github/workflows/test.yml
. It calls the action which does job-run specific things.
The calling workflow must do two critical things:
- Specify the
actions: read
permission for the GitHub Token - Specify the
GH_TOKEN
with the permissions as an env var for the action