diff --git a/.github/workflows/java-cd.yml b/.github/workflows/java-cd.yml index 42984cc27e..3c3123ca12 100644 --- a/.github/workflows/java-cd.yml +++ b/.github/workflows/java-cd.yml @@ -227,11 +227,13 @@ jobs: - name: Check status of deployment run: | - echo "BEARER_TOKEN=$(echo "${{ secrets.CENTRAL_TOKEN_USERNAME }}:${{ secrets.CENTRAL_TOKEN_PASSWORD }}" | base64)" >> $GITHUB_ENV - echo "DEPLOYMENT_ID=6a48b2c5-c3c5-4941-bd38-6011b0985ae5" >> $GITHUB_ENV + export BEARER_TOKEN=$(echo "${{ secrets.CENTRAL_TOKEN_USERNAME }}:${{ secrets.CENTRAL_TOKEN_PASSWORD }}" | base64) + export DEPLOYMENT_ID=6a48b2c5-c3c5-4941-bd38-6011b0985ae5 + echo "BEARER_TOKEN=$BEARER_TOKEN" | base64)" >> $GITHUB_ENV + echo "DEPLOYMENT_ID=$DEPLOYMENT_ID" >> $GITHUB_ENV export DEPLOYMENT_STATUS=`curl --request POST \ - --header "Authorization: Bearer ${{ env.BEARER_TOKEN }}" \ - "https://central.sonatype.com/api/v1/publisher/status?id=${{ env.DEPLOYMENT_ID }}" \ + --header "Authorization: Bearer $BEARER_TOKEN" \ + "https://central.sonatype.com/api/v1/publisher/status?id=$DEPLOYMENT_ID" \ | jq '.deploymentState'` if [[ $DEPLOYMENT_STATUS -ne ""VALIDATED"" || $DEPLOYMENT_STATUS -eq null ]]; then exit 1 ; fi