Skip to content

Commit 2b2d92d

Browse files
afragencostdev
andauthored
Update GitHub workflow for POT creation using native functions and not a GitHub Action (#259)
Signed-off-by: Andy Fragen <[email protected]> Co-authored-by: Colin Stewart <[email protected]>
1 parent e91ebec commit 2b2d92d

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

.github/workflows/generate-pot-pr.yml

+6-9
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828

2929
- name: Configure git user
3030
run: |
31-
git config --global user.email "[email protected]"
32-
git config --global user.name "Andy Fragen"
31+
git config user.name ${{ github.actor }}
32+
git config user.email ${{ github.actor }}@users.noreply.github.com
3333
3434
- name: Check if remote branch exists
3535
run: echo "REMOTE_BRANCH_EXISTS=$([[ -z $(git ls-remote --heads origin generate-pot) ]] && echo "0" || echo "1")" >> $GITHUB_ENV
@@ -62,10 +62,7 @@ jobs:
6262
6363
- name: Create pull request
6464
if: env.CHANGES_DETECTED == 1
65-
uses: repo-sync/pull-request@v2
66-
with:
67-
source_branch: generate-pot
68-
destination_branch: ${{ github.event.repository.default_branch }}
69-
github_token: ${{ secrets.GITHUB_TOKEN }}
70-
pr_title: Generate POT
71-
pr_body: "This is an automated pull-request"
65+
run: gh pr create --base ${BRANCH_NAME} --head generate-pot --title "Generate POT - $(date +'%Y-%m-%d')" --body "Automated PR"
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

0 commit comments

Comments
 (0)