ad-m / github-push-action

GitHub actions to push back to repository eg. updated code
MIT License
1.21k stars 229 forks source link

Action fails if branch does not exist #48

Open psychemedia opened 4 years ago

psychemedia commented 4 years ago

The action seems to fail if a pushed to branch does not already exist?

It would be useful if the branch was created in such a case.

vadi2 commented 4 years ago

Confirmed. For the time being, this prerequisite works:

    - name: create texts branch
      uses: peterjgrainger/action-create-branch@v1.0.0
      env: 
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        branch: updated-text-for-translation
psychemedia commented 4 years ago

That action to create a branch gives an error if the branch already exists. The updated action peterjgrainger/action-create-branch@v2.0.0 will create a branch if it does not exist, pass if it does.