←  github actions

Views:

Workflow Context of a github action

Workflow context holds the information about the workflow, jobs, event, repository, author etc... We can use this information in our actions.

name: Workflow Context

on: [push]

jobs:
  workflow-context:
    runs-on: ubuntu-latest
    steps:
      - name: Workflow Context
        uses: actions/github-script@v6
        with:
          script: |
            console.log(context)

Result

Following is the context object output for the above workflow-

workflow-context-output