-
-
Notifications
You must be signed in to change notification settings - Fork 25
Run create build step on opened _or_ sync actions #23
base: dev
Are you sure you want to change the base?
Conversation
Related to issue #21 |
action.yaml
Outdated
@@ -66,7 +66,7 @@ runs: | |||
-H "Accept: application/vnd.heroku+json; version=3" \ | |||
-H "Authorization: Bearer ${{ inputs.api-key }}" | |||
- name: Create Build | |||
if: ${{ github.event_name == 'pull_request' && github.event.action == 'synchronize' }} | |||
if: ${{ github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'synchronize') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't change. When a review app is created, it automatically has a build process going on. So from the Create App
step we can use the data returned to find the output stream URL and curl that URL like it's done in Create Build
step.
The new change is basically the same as the old one. They both create a new build. What I meant was that the create app endpoint returns data that can be used in a different step to curl the build output without creating a new build like you currently have. |
@pmbanugo So it looks like we may need to request the list of builds and then use the output stream URL of index 0 since that's the build most recently started from the create step. Although not sure if it's safe to assume index 0 will always be the build from the |
In this case, 0 will be the correct value because it should be the only build for the app. |
Sounds good. The other issue I'm seeing is we need to wait for an app status of |
Run the create build step on
opened
orsynchronize