diff --git a/.github/workflows/generate-pot-pr.yml b/.github/workflows/generate-pot-pr.yml index 04077e3..8b5b1d4 100644 --- a/.github/workflows/generate-pot-pr.yml +++ b/.github/workflows/generate-pot-pr.yml @@ -28,8 +28,8 @@ jobs: - name: Configure git user run: | - git config --global user.email "andy@thefragens.com" - git config --global user.name "Andy Fragen" + git config user.name ${{ github.actor }} + git config user.email ${{ github.actor }}@users.noreply.github.com - name: Check if remote branch exists run: echo "REMOTE_BRANCH_EXISTS=$([[ -z $(git ls-remote --heads origin generate-pot) ]] && echo "0" || echo "1")" >> $GITHUB_ENV @@ -62,10 +62,7 @@ jobs: - name: Create pull request if: env.CHANGES_DETECTED == 1 - uses: repo-sync/pull-request@v2 - with: - source_branch: generate-pot - destination_branch: ${{ github.event.repository.default_branch }} - github_token: ${{ secrets.GITHUB_TOKEN }} - pr_title: Generate POT - pr_body: "This is an automated pull-request" + run: gh pr create --base ${BRANCH_NAME} --head generate-pot --title "Generate POT - $(date +'%Y-%m-%d')" --body "Automated PR" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH_NAME: ${{ github.head_ref || github.ref_name }}