Skip to content

Commit d8a2861

Browse files
authored
Update test-loop.yml
1 parent cba5728 commit d8a2861

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

.github/workflows/test-loop.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@ jobs:
1111

1212
outputs:
1313
colors: ${{ steps.colors.outputs.colores }}
14-
project-json: ${{ steps.json-project-step.outputs.json-project }}
14+
project-string: ${{ steps.project-string-step.outputs.json-project-string }}
15+
# project-json: ${{ steps.json-project-step.outputs.json-project }}
1516

1617
steps:
1718
- name: Define Colors
1819
id: colors
1920
run: |
2021
echo 'colores=["red", "green", "blue"]' >> "$GITHUB_OUTPUT"
2122
22-
- name: Define JSON
23-
id: json-project-step
23+
- name: Define Project String
24+
id: project-string-step
2425
run: |
25-
echo 'json-project={"count":4,"include":[{"project":"foo","config":"Debug"},{"project":"bar","config":"Release"}]}' >> "$GITHUB_OUTPUT"
26+
echo 'json-project-string={"count":4,"include":[{"project":"foo","config":"Debug"},{"project":"bar","config":"Release"}]}' >> "$GITHUB_OUTPUT"
2627
# echo 'json-project={"count":4,"include":[{"project":"foo","config":"Debug"}, \
2728
# {"project":"bar","config":"Release"}]}' >> "$GITHUB_OUTPUT"
2829

@@ -36,6 +37,10 @@ jobs:
3637
# --url ${{ vars.ansible_url }}projects/?scm_url=git%40git.bcbssc.com%3AInformationSystems%2Funix_platform_ansible.git \
3738
# )" >> $GITHUB_OUTPUT
3839

40+
# - name: Define JSON
41+
# id: json-project-step
42+
# run: |
43+
# echo '
3944
## Job 2: Print the output of the "define-matrix" job
4045
print-output:
4146
runs-on: ubuntu-latest
@@ -47,7 +52,12 @@ jobs:
4752
4853
- name: Print project-json variable
4954
run: |
50-
echo ${{ toJson(needs.define-matrix.outputs.project-json) }}
55+
echo "The outputs are ${{ toJson(needs.define-matrix.outputs.project-json) }}"
56+
echo
57+
jobjson=$(echo "${{ toJson(needs.define-matrix.outputs) }}" )
58+
echo $jobjson | yq
59+
echo
60+
echo "colors is $(echo $jobjson | yq .colors)"
5161
5262
# # job 2.1
5363
# print-output-2:

0 commit comments

Comments
 (0)