GitHub Actions : Merging two branches

Viewed 1432

As I am trying to merge from the master branch to the develop branch using GitHub Actions, the action is giving me an error.

The script is:

jobs:
  SomeJob:
    runs-on: ubuntu-latest
    
    steps:
      - uses: actions/checkout@v2
      - run: |
              git config --global user.email "my_useremail"
              git config --global user.name "my_username"
              git config --global pull.ff only
              git clone "https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/my_username/repoName.git"
              git fetch
              cd repoName
              git checkout master
              git pull
              git push
              git checkout develop
              git pull
              git push
              git merge master
              #git commit -I "a commit by github actions on develop"
              #git push

The error that I receive when I uncomment the last two lines:

nothing to commit, working tree clean Error: Process completed with exit code 1.

If I try the above on my local git, it works with no problems.

0 Answers
Related