Skip to content

Commit 9e71a0a

Browse files
committed
print github context in a different way
In a recent build [with an unusually long change message?] this failed, due to the overall limit on environment variable size in Linux: ``` An error occurred trying to start process '/usr/bin/bash' with working directory '/home/runner/work/Adafruit_CircuitPython_Bundle/Adafruit_CircuitPython_Bundle'. Argument list too long ``` https://github.com/adafruit/Adafruit_CircuitPython_Bundle/actions/runs/2459215636 [link will work for a limited time due to github actions log expiration policy] The new printed value may not be 100% the same as the old one but it's real close.
1 parent d2c1b97 commit 9e71a0a

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Dump GitHub context
14-
env:
15-
GITHUB_CONTEXT: ${{ toJson(github) }}
16-
run: |
17-
export GITHUB_CONTEXT
18-
printenv GITHUB_CONTEXT
14+
uses: actions/github-script@v6
15+
with:
16+
script: console.log(JSON.stringify(context, null, 2))
1917
- name: Translate Repo Name For Build Tools filename_prefix
2018
id: repo-name
2119
run: |

.github/workflows/images.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ jobs:
1818
runs-on: ubuntu-20.04
1919
steps:
2020
- name: Dump GitHub context
21-
env:
22-
GITHUB_CONTEXT: ${{ toJson(github) }}
23-
run: echo "$GITHUB_CONTEXT"
24-
21+
uses: actions/github-script@v6
22+
with:
23+
script: console.log(JSON.stringify(context, null, 2))
2524
- uses: actions/[email protected]
2625

2726
- name: checkout submodules

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Dump GitHub context
16-
env:
17-
GITHUB_CONTEXT: ${{ toJson(github) }}
18-
run: echo "$GITHUB_CONTEXT"
16+
uses: actions/github-script@v6
17+
with:
18+
script: console.log(JSON.stringify(context, null, 2))
1919
- name: Translate Repo Name For Build Tools filename_prefix
2020
id: repo-name
2121
run: |

0 commit comments

Comments
 (0)