Skip to content

Commit

Permalink
Use rep vars for git commit user
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceo committed May 17, 2024
1 parent 73820d5 commit f986b52
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/create-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ jobs:
- name: Create branch and PR
run: |
set -e
git config --global user.name [email protected]
git config --global user.email [email protected]
git config --global user.name ${{ toJson(vars.PULL_REQUEST_GIT_USER).name }}
git config --global user.email ${{ toJson(vars.PULL_REQUEST_GIT_USER).email }}
git checkout -b ${{ env.PR_BRANCH }}
git push --set-upstream origin ${{ env.PR_BRANCH }}
git add composer.json composer.lock
git commit -m "Use new dependency url on dpl-react: ${{ env.BUILD_URL }}"
git commit -m "Insert new reference to dependency ${{ env.PACKAGE }}: ${{ env.BUILD_URL }}"
git push
gh pr create --base develop --head ${{ env.PR_BRANCH }} --title "PR for ${{ env.PR_BRANCH }}" --body "This is an automated PR for ${{ env.PR_BRANCH }}"
if: ${{ env.PR_BRANCH && env.BUILD_URL && steps.manipulate_composer.outcome == 'success' }}
if: ${{ vars.PULL_REQUEST_GIT_USER && env.PACKAGE && env.PR_BRANCH && env.BUILD_URL && steps.manipulate_composer.outcome == 'success' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit f986b52

Please sign in to comment.