Github
Actions
Section titled “Actions”Dump context
Section titled “Dump context”jobs: printJob: name: Print event runs-on: ubuntu-latest steps: - name: Dump GitHub context env: GITHUB_CONTEXT: ${{ toJson(github) }} run: | echo "$GITHUB_CONTEXT"
gh cli
Section titled “gh cli”List deployment environments
Section titled “List deployment environments”gh api /repos/OWNER/REPO/environments | jq '.environments[].name'
# To neatly formatted table e.g.gh api repos/OWNER/REPO/environments | jq -r '(["ID", "Name", "Prevent-Self-review"] | (., map(length*"-"))), (.environments[] | [.id, .name, .protection_rules[]?.prevent_self_review]) | @tsv' | column -t