@@ -7,38 +7,74 @@ debugging GitHub Actions.
77
88Secrets are automatically filtered in the Actions logs.
99
10+ ** Important:** use v2.0.0 or later, as v1 was designed for the initial GitHub Actions beta, and may no longer work as expected.
11+
12+ ## Usage instructions
13+
14+ Add a step with ` - uses: hmarr/debug-action@v2.0.0 ` to a workflow file. Here's an example of a complete workflow file:
15+
16+ ``` yaml
17+ name : Debug
18+ on : pull_request_target
19+
20+ jobs :
21+ build :
22+ runs-on : ubuntu-latest
23+ steps :
24+ - uses : hmarr/debug-action@v2.0.0
25+ ` ` `
26+
27+
1028## Example output (in the Actions logs)
1129
1230` ` `
13- -- Environment variables ----------------------------------------------
14- SECRET_TOKEN=[FILTERED]
15- HOSTNAME=cdca0460a2e8
16- SHLVL=1
17- HOME=/github/home
18- GITHUB_EVENT_PATH=/github/workflow/event.json
19- GITHUB_WORKFLOW=New workflow
20- PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
21- GITHUB_ACTION=hmarr/debug-action
22- GITHUB_REPOSITORY=hmarr/some-repository
23- GITHUB_WORKSPACE=/github/workspace
24- GITHUB_SHA=2b337df5ad49034668adfa8f7d69120bb844eb96
25- GITHUB_ACTOR=hmarr
26- GITHUB_REF=refs/heads/some-branch
27- PWD=/github/workspace
28- GITHUB_EVENT_NAME=pull_request
29- -----------------------------------------------------------------------
30-
31- -- Event JSON ---------------------------------------------------------
32- {
33- "action": "opened",
34- "number": 10,
35- "pull_request": {
36- ...
31+ ▶ Environment variables
32+ ACTIONS_RUNTIME_TOKEN=***
33+ CI=true
34+ GITHUB_ACTION=hmarrdebug-action
35+ GITHUB_ACTIONS=true
36+ GITHUB_ACTION_REF=v2.0.0
37+ GITHUB_ACTION_REPOSITORY=hmarr/debug-action
38+ GITHUB_ACTOR=hmarr
39+ GITHUB_API_URL=https://api.github.com
40+ GITHUB_BASE_REF=main
41+ GITHUB_EVENT_NAME=pull_request_target
42+ GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
43+ GITHUB_HEAD_REF=patch-1
44+ GITHUB_JOB=build
45+ GITHUB_REF=refs/heads/main
46+ GITHUB_REPOSITORY=hmarr/demo
47+ GITHUB_REPOSITORY_OWNER=hmarr
48+ GITHUB_RUN_ID=658297586
49+ GITHUB_RUN_NUMBER=15
50+ GITHUB_SERVER_URL=https://github.com
51+ GITHUB_SHA=a4171998f9bf51fc5b9d0283b7d5243ac28954d1
52+ GITHUB_WORKFLOW=approve
53+ GITHUB_WORKSPACE=/home/runner/work/demo/demo
54+ HOME=/home/runner
55+ INPUT_GITHUB-TOKEN=***
56+ INVOCATION_ID=44ad8f42f5244809971260b35b889a08
57+ LEIN_HOME=/usr/local/lib/lein
58+ LEIN_JAR=/usr/local/lib/lein/self-installs/leiningen-2.9.5-standalone.jar
59+ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
60+ RUNNER_OS=Linux
61+ RUNNER_TOOL_CACHE=/opt/hostedtoolcache
62+ RUNNER_USER=runner
63+ RUNNER_WORKSPACE=/home/runner/work/demo
64+ USER=runner
65+
66+ ▶ Event JSON
67+ {
68+ " action " : " opened" ,
69+ " number " : 20,
70+ " pull_request " : {
71+ ...
72+ }
3773 }
38- }
39- -----------------------------------------------------------------------
4074```
4175
76+ That example is truncated a bit, but you get the idea.
77+
4278## Development and release process
4379
4480Each major version corresponds to a branch (e.g. ` v1 ` , ` v2 ` ). The latest major
0 commit comments