GitHub Actions: Print All Values from github Context

18 Feb 2024 18 Feb 2024 1 min read GitHub GitHub Actions

The following workflow step prints the values of all variables available in the workflow’s github context:


      - name: Dump GitHub context
        env:
          GITHUB_CONTEXT: ${{ toJson(github) }}
        run: echo "$GITHUB_CONTEXT"
Tip

For easier browsing of this huge JSON structure, open job’s raw log and copy the JSON to a text editor that supports JSON code folding:

View raw build logs