From f225c1c1c9ebbeb561fd010a3c1b1fc9349f32df Mon Sep 17 00:00:00 2001 From: Dmitry Maklygin Date: Wed, 12 Jul 2023 19:38:12 +0300 Subject: [PATCH] chore: tbs --- .github/workflows/test-jira-deployment.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-jira-deployment.yaml b/.github/workflows/test-jira-deployment.yaml index be7bb7893c2..fa023186667 100644 --- a/.github/workflows/test-jira-deployment.yaml +++ b/.github/workflows/test-jira-deployment.yaml @@ -123,18 +123,20 @@ jobs: fi - name: Convert your JIRA base URL into a Cloud ID + id: get-cloud-id if: ${{ env.JIRA_KEYS != '' }} env: JIRA_BASE_URL: ${{ secrets.CLOUD_INSTANCE_BASE_URL }} run: | - CLOUD_ID_TOKEN=$(\ + CLOUD_ID=$(\ curl "${JIRA_BASE_URL}/_edge/tenant_info" | \ jq --raw-output '.cloudId' ) - echo "CLOUD_ID_TOKEN=$CLOUD_ID_TOKEN" >> $GITHUB_ENV + echo "CLOUD_ID=$CLOUD_ID" >> $GITHUB_OUTPUT - name: Get Access Token + id: get-access-token if: ${{ env.JIRA_KEYS != '' }} run: | ACCESS_TOKEN=$(\ @@ -151,7 +153,7 @@ jobs: jq --raw-output '.access_token' ) - echo "ACCESS_TOKEN=$ACCESS_TOKEN" >> $GITHUB_ENV + echo "ACCESS_TOKEN=$ACCESS_TOKEN" >> $GITHUB_OUTPUT - name: Send request to Create new JIRA deployment if: ${{ env.JIRA_KEYS != '' }} @@ -161,8 +163,8 @@ jobs: RESPONSE=$(curl --silent \ --request POST \ - --url "https://api.atlassian.com/jira/deployments/0.1/cloud/${CLOUD_ID_TOKEN}/bulk" \ - --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --url "https://api.atlassian.com/jira/deployments/0.1/cloud/${{ steps.get-cloud-id.output.CLOUD_ID }}/bulk" \ + --header "Authorization: Bearer ${{ steps.get-access-token.output.ACCESS_TOKEN }}" \ --header "Accept: application/json" \ --header "Content-Type: application/json" \ --data '{