Skip to content

Commit

Permalink
Update GitHub workflow for POT creation using native functions and no…
Browse files Browse the repository at this point in the history
…t a GitHub Action (#259)

Signed-off-by: Andy Fragen <[email protected]>
Co-authored-by: Colin Stewart <[email protected]>
  • Loading branch information
afragen and costdev authored Jan 9, 2025
1 parent e91ebec commit 2b2d92d
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/generate-pot-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:

- name: Configure git user
run: |
git config --global user.email "[email protected]"
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
Expand Down Expand Up @@ -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 }}

0 comments on commit 2b2d92d

Please sign in to comment.