chrnorm/deployment-action

Error creating deployment

tiferrei opened this issue · 8 comments

Hi there, I have successfully used this action in a develop branch. After merging into master it fails with:

##[error]HttpError: Conflict merging develop into refs/heads/master.
##[error]Conflict merging develop into refs/heads/master.
##[error]Node run failed with exit code 1

I don't understand this output, there were no conflicts merging the PR, it was merged. This workflow is running on push events, so it would be triggered on a new clean master commit.
As you can see, the merge was successful:
Screenshot 2019-10-21 at 10 50 21

Any idea what's going on?

Thank you,
Tiago

Hey @tiferrei, thanks for filing the first issue!

Were there additional commits pushed to the develop branch after you merged to master?

I am personally using this action on projects with feature branches - after I merge a PR I am deleting the branch. I haven't seen this error before on my repos

Interesting, I tried with a new PR and it works. Can't seem to reproduce it so closing for now. Thanks for creating this action!

Hi this issue seems to have resurfaced, exactly the same setup and environment.

There are some new commits in development, however this is a PR from a release branch to master.

This only ever happens on master, it fails to create the deployment with this error sometimes:

##[error]HttpError: Empty value for parameter 'deployment_id': undefined
##[error]Empty value for parameter 'deployment_id': undefined
##[error]Node run failed with exit code 1

I found the issue. First auto_merge is set to true. This is not great for git flow setups, and will also cause the action to fait if it does auto merge.
Secondly, the package dependencies are not built the way GitHub suggests, so the action will fail if it is the first JS action being ran.

Secondly, the package dependencies are not built the way GitHub suggests, so the action will fail if it is the first JS action being ran.

@tiferrei could you please elaborate on the package dependencies being built differently to GitHub's suggestion?

I will push a fix for the first issue now (I just had it happen on one of my own repos too). Thanks for your work looking into this!

I've released a new version of the action that should resolve these issues. auto_merge is now an optional input parameter, set to false by default.

To use the new version:

- name: Deployment Action
  uses: chrnorm/deployment-action@v1.1.0

I'll close this for now but feel free to file a new issue or re-open this one if you have issues with the package dependencies.