Skip to content

Commit

Permalink
fix(generate.yml): add condition to only configure git user and push …
Browse files Browse the repository at this point in the history
…changes if not on master branch

feat(generate.yml): add condition to create pull request only if not on master branch
  • Loading branch information
jandroav committed Mar 4, 2024
1 parent aa6f154 commit 245b2fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ jobs:
mv *.proto ./proto-commands
- name: Configure git user
if: github.ref != 'refs/heads/master'
run: |
git config --global init.defaultBranch master
git config --global user.name "liquibot"
git config --global user.email "[email protected]"
- name: Push changes
if: github.ref != 'refs/heads/master'
continue-on-error: true
run: |
git pull
Expand All @@ -48,6 +50,7 @@ jobs:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}

- name: Create Pull Request
if: github.ref != 'refs/heads/master'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.BOT_TOKEN }}
Expand Down

0 comments on commit 245b2fa

Please sign in to comment.