Skip to content

Commit faa7d88

Browse files
adamfweidmangiraffechen
authored andcommitted
Fix quoting when echoing workflow JSON (google-gemini#10596)
1 parent ef04ce3 commit faa7d88

File tree

12 files changed

+38
-15
lines changed

12 files changed

+38
-15
lines changed

.github/actions/create-pull-request/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ runs:
3232
steps:
3333
- name: '📝 Print Inputs'
3434
shell: 'bash'
35-
run: 'echo "${{ toJSON(inputs) }}"'
35+
env:
36+
JSON_INPUTS: '${{ toJSON(inputs) }}'
37+
run: 'echo "$JSON_INPUTS"'
3638
- name: 'Creates a Pull Request'
3739
if: "inputs.dry-run != 'true'"
3840
env:

.github/actions/post-coverage-comment/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ runs:
2929
steps:
3030
- name: '📝 Print Inputs'
3131
shell: 'bash'
32-
run: 'echo "${{ toJSON(inputs) }}"'
32+
env:
33+
JSON_INPUTS: '${{ toJSON(inputs) }}'
34+
run: 'echo "$JSON_INPUTS"'
3335
- name: 'Prepare Coverage Comment'
3436
id: 'prep_coverage_comment'
3537
shell: 'bash'

.github/actions/publish-release/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ runs:
5757
steps:
5858
- name: '📝 Print Inputs'
5959
shell: 'bash'
60-
run: 'echo "${{ toJSON(inputs) }}"'
60+
env:
61+
JSON_INPUTS: '${{ toJSON(inputs) }}'
62+
run: 'echo "$JSON_INPUTS"'
6163

6264
- name: '👤 Configure Git User'
6365
working-directory: '${{ inputs.working-directory }}'

.github/actions/push-docker/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ runs:
2020
steps:
2121
- name: '📝 Print Inputs'
2222
shell: 'bash'
23-
run: 'echo "${{ toJSON(inputs) }}"'
23+
env:
24+
JSON_INPUTS: '${{ toJSON(inputs) }}'
25+
run: 'echo "$JSON_INPUTS"'
2426
- name: 'Checkout'
2527
uses: 'actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955' # ratchet:actions/checkout@v4
2628
with:

.github/actions/push-sandbox/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ runs:
3030
steps:
3131
- name: '📝 Print Inputs'
3232
shell: 'bash'
33-
run: 'echo "${{ toJSON(inputs) }}"'
33+
env:
34+
JSON_INPUTS: '${{ toJSON(inputs) }}'
35+
run: 'echo "$JSON_INPUTS"'
3436
- name: 'Checkout'
3537
uses: 'actions/checkout@v4'
3638
with:

.github/actions/run-tests/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ runs:
1515
steps:
1616
- name: '📝 Print Inputs'
1717
shell: 'bash'
18-
run: 'echo "${{ toJSON(inputs) }}"'
18+
env:
19+
JSON_INPUTS: '${{ toJSON(inputs) }}'
20+
run: 'echo "$JSON_INPUTS"'
1921
- name: 'Run Tests'
2022
env:
2123
GEMINI_API_KEY: '${{ inputs.gemini_api_key }}'

.github/actions/tag-npm-release/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ runs:
2323
steps:
2424
- name: '📝 Print Inputs'
2525
shell: 'bash'
26-
run: 'echo "${{ toJSON(inputs) }}"'
26+
env:
27+
JSON_INPUTS: '${{ toJSON(inputs) }}'
28+
run: 'echo "$JSON_INPUTS"'
2729

2830
- name: 'Setup Node.js'
2931
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020'

.github/actions/verify-release/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ runs:
2323
steps:
2424
- name: '📝 Print Inputs'
2525
shell: 'bash'
26-
run: 'echo "${{ toJSON(inputs) }}"'
26+
env:
27+
JSON_INPUTS: '${{ toJSON(inputs) }}'
28+
run: 'echo "$JSON_INPUTS"'
2729

2830
- name: 'Checkout'
2931
uses: 'actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955' # ratchet:actions/checkout@v4

.github/workflows/release-manual.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ jobs:
6565
fetch-depth: 0
6666

6767
- name: 'Debug Inputs'
68-
run: 'echo "${{ toJSON(inputs) }}"'
68+
shell: 'bash'
69+
env:
70+
JSON_INPUTS: '${{ toJSON(inputs) }}'
71+
run: 'echo "$JSON_INPUTS"'
6972

7073
- name: 'Setup Node.js'
7174
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020'

.github/workflows/release-nightly.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ jobs:
5353
run: 'npm ci'
5454

5555
- name: 'Print Inputs'
56-
run: |
57-
echo "${{ toJSON(github.event.inputs) }}"
56+
shell: 'bash'
57+
env:
58+
JSON_INPUTS: '${{ toJSON(github.event.inputs) }}'
59+
run: 'echo "$JSON_INPUTS"'
5860

5961
- name: 'Run Tests'
6062
if: "${{ github.event_name == 'schedule' || github.event.inputs.force_skip_tests == 'false' }}"

0 commit comments

Comments
 (0)