Skip to content

Commit

Permalink
fix(fix_custom_translations): pat prefix
Browse files Browse the repository at this point in the history
pat prefix
  • Loading branch information
snomiao committed Dec 30, 2024
1 parent fc3dfe7 commit 4426811
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/i18n-custom-nodes-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,29 +120,40 @@ jobs:
-F enabled=true
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Commit and push changes
- name: Commit changes
working-directory: ComfyUI/custom_nodes/${{ env.repository }}
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
# Configure the remote with token
git remote add pr "https://x-access-token:[email protected]/${{ env.fork_owner }}/${{ env.repository }}.git"
git remote -v
# Create and switch to new branch
git checkout -b update-locales
# Stage and commit changes
git add -A
git commit -m "Update locales"
- uses: actions/create-github-app-token@v1
id: app-token
with:
app_id: ${{ vars.PR_APP_ID }}
private_key: ${{ secrets.PR_CLIENT_SECRET }}
repositories: ${{ env.fork_owner }}/${{ env.repository }}
# - uses: actions/checkout@v4
# with:
# token: ${{ steps.app-token.outputs.token }}
- name: Push changes
working-directory: ComfyUI/custom_nodes/${{ env.repository }}
run: |
# Force push to create the branch
echo "Pushing changes to ${{ env.fork_owner }}/${{ env.repository }}"
git push -f pr update-locales ||
git push -f https://x-access-token:[email protected]/${{ env.fork_owner }}/${{ env.repository }}.git update-locales
git push -f https://x-access-token:[email protected]/${{ env.fork_owner }}/${{ env.repository }}.git update-locales || \
git push -f https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/${{ env.fork_owner }}/${{ env.repository }}.git update-locales
env:
PR_GH_TOKEN: ${{ secrets.PR_GH_TOKEN }}
- name: Create PR
working-directory: ComfyUI/custom_nodes/${{ env.repository }}
run: |
# Create PR using gh cli
gh pr create --title "Update locales for ${{ env.repository }}" --repo ${{ env.owner }}/${{ env.repository }} --head ${{ env.fork_owner }}:update-locales
working-directory: ComfyUI/custom_nodes/${{ env.repository }}
env:
GH_TOKEN_PR: ${{ secrets.GH_TOKEN_PR }}
GH_TOKEN: ${{ secrets.PR_GH_TOKEN }}

0 comments on commit 4426811

Please sign in to comment.