Skip to content

Commit

Permalink
push custom config
Browse files Browse the repository at this point in the history
  • Loading branch information
shashanksinha89 committed Jun 19, 2023
1 parent 7be0f88 commit 5c3f9f5
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,25 +58,37 @@ runs:
curl -X POST https://api.heroku.com/review-apps \
-d '{
"source_blob": {"url": "'"$SOURCE_GET_URL"'", "version": "'"${{ github.event.pull_request.head.sha }}"'"},
"branch": "${{ github.head_ref }}",
"branch": "${{ env.APP_NAME }}",
"pipeline": "${{ inputs.pipeline-id }}",
"pr_number": ${{ github.event.number }}
"pr_number": ${{ github.event.number }},
"wait_for_ci": true
}' \
-H "Content-Type: application/json" \
-H "Accept: application/vnd.heroku+json; version=3" \
-H "Authorization: Bearer ${{ inputs.api-key }}"
until curl -s -X GET https://api.heroku.com/apps/$APP_NAME/review-app \
-H 'Accept: application/vnd.heroku+json; version=3' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${{ inputs.api-key }}" |jq .status |grep created
do
echo "Intial RA setup in progress..."
sleep 40
done
echo "Setup is complete!!!"
- name: Create Build
if: ${{ github.event_name == 'pull_request' && github.event.action == 'synchronize' }}
shell: bash
run: |
export SOURCE_GET_URL=$(echo ${{ toJSON(steps.source_endpoint.outputs.SOURCE_ENDPOINT) }} | jq -r '.get')
export OUTPUT_STREAM_URL=$(curl -X POST https://api.heroku.com/apps/$APP_NAME/builds \
-d '{"source_blob":{"url":"'"$SOURCE_GET_URL"'", "version": "${{ github.event.pull_request.head.sha }}"}}' \
-d '{
"source_blob": {"url": "'"$SOURCE_GET_URL"'", "version": "'"${{ github.event.pull_request.head.sha }}"'"}
}' \
-H 'Accept: application/vnd.heroku+json; version=3' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${{ inputs.api-key }}" | \
jq -r '.output_stream_url')
curl $OUTPUT_STREAM_URL
- name: Set Output:url
id: output-url
shell: bash
Expand Down

0 comments on commit 5c3f9f5

Please sign in to comment.