Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub workflow for POT creation using native functions and not a GitHub Action #259

Merged
merged 13 commits into from
Jan 9, 2025
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 }}
Loading