test: 处理多行响应值

This commit is contained in:
Junyan Qin
2023-12-27 15:52:12 +00:00
parent 0869b57741
commit 2d148c4970
+1 -4
View File
@@ -36,9 +36,6 @@ jobs:
with: with:
python-version: '3.10' python-version: '3.10'
- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq
- name: Install dependencies - name: Install dependencies
run: | run: |
cd qcg-tester cd qcg-tester
@@ -69,7 +66,7 @@ jobs:
- name: Set PR source branch as env variable - name: Set PR source branch as env variable
if: github.event_name == 'issue_comment' if: github.event_name == 'issue_comment'
run: | run: |
PR_SOURCE_BRANCH=$(echo ${{ steps.get-pr.outputs.data }} | jq -r '.head.ref') PR_SOURCE_BRANCH=$(echo "${{ steps.get-pr.outputs.data }}" | jq -r '.head.ref')
echo "BRANCH=$PR_SOURCE_BRANCH" >> $GITHUB_ENV echo "BRANCH=$PR_SOURCE_BRANCH" >> $GITHUB_ENV
- name: Set PR Branch as bash env - name: Set PR Branch as bash env