Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic setup fails on error "a branch named 'master' already exists" #4

Closed
spacewaffle opened this issue Jun 16, 2020 · 4 comments
Closed

Comments

@spacewaffle
Copy link

spacewaffle commented Jun 16, 2020

This is what my yaml file looks like. Notice checkout was bumped to v2. Not sure if that should change anything. Action is failing on the checkout which seems to make sense. Can't checkout a new branch called master if it already exists locally.

git fetch origin master
git checkout -b master origin/master
name: 'Auto Merge Master to Staging'

on:
  push:
    branches:
      - master

jobs:
  auto-merge-master-to-staging:

    runs-on: ubuntu-latest

    steps:
    - name: Checkout
      uses: actions/checkout@v2

    - name: Merging Master Into Staging
      uses: robotology/[email protected]
      with:
        development_branch: 'staging'
        allow_ff: false
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@spacewaffle
Copy link
Author

spacewaffle commented Jun 16, 2020

Just confirmed the action works with checkout@v1. It's incompatible with checkout@v2. Ya'll should consider supporting v2 since the official github docs are pointing to using v2 over v1 now.

namoscato added a commit to namoscato/google-photos-vue that referenced this issue Jul 2, 2020
@pruthvi-rollick
Copy link

Indeed works with checkout@v1 but if we were to attempt a second merge to a different development branch, it fails again with the same error.
image

@Toilal
Copy link
Contributor

Toilal commented Dec 17, 2020

I wrote a pull request that should fix this issue.

@drdanz
Copy link
Member

drdanz commented Jan 13, 2021

Fixed by #5 and released in v1.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants