Debugging json-util's get function.
This commit is contained in:
@@ -34,18 +34,21 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo '${{ toJSON(steps.check-pr.outputs.response) }}'
|
echo '${{ toJSON(steps.check-pr.outputs.response) }}'
|
||||||
|
|
||||||
|
- name: Extract gocurl Response to Valid JSON
|
||||||
|
id: extract-json
|
||||||
|
run: |
|
||||||
|
RESPONSE='${{ toJSON(steps.check-pr.outputs.response) }}'
|
||||||
|
echo "$RESPONSE" | jq '.' > valid_response.json
|
||||||
|
echo "response_json=$(cat valid_response.json)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Parse PR Response
|
- name: Parse PR Response
|
||||||
id: parse-pr
|
id: parse-pr
|
||||||
uses: yakubique/json-utils@v1.8
|
uses: yakubique/json-utils@v1.8
|
||||||
with:
|
with:
|
||||||
input: '${{ toJSON(steps.check-pr.outputs.response) }}'
|
input: '${{ steps.extract-json.outputs.response_json }}'
|
||||||
action: "get"
|
action: "get"
|
||||||
key: "status"
|
key: "status"
|
||||||
|
|
||||||
- name: View output from json-utils
|
|
||||||
run: |
|
|
||||||
echo '${{ steps.parse-pr.outputs.status }}'
|
|
||||||
|
|
||||||
# Step 2: Create PR if none exists
|
# Step 2: Create PR if none exists
|
||||||
# - name: Create PR in Gitea
|
# - name: Create PR in Gitea
|
||||||
# if: ${{ steps.parse-pr.outputs.status == '404' }}
|
# if: ${{ steps.parse-pr.outputs.status == '404' }}
|
||||||
|
|||||||
Reference in New Issue
Block a user