Skip to content

Commit

Permalink
fix(actions): fix crowdin action, use bot to create pr
Browse files Browse the repository at this point in the history
  • Loading branch information
Lulalaby committed Aug 16, 2024
1 parent c0817ac commit 61a7a3f
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 42 deletions.
80 changes: 40 additions & 40 deletions .github/workflows/docs-localization-download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
base_path: "."
commit_message: "docs: Update localizations from Crowdin"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}
- name: "Convert Outputs"
Expand Down Expand Up @@ -88,46 +88,46 @@ jobs:
PR_ID=$(echo -n "${{ needs.download.outputs.pr_id }}" | base64 --decode)
echo "pr_ref=$PR_REF" >> $GITHUB_OUTPUT
echo "pr_id=$PR_ID" >> $GITHUB_OUTPUT
- name: Invoke checks workflow
uses: benc-uk/[email protected]
with:
workflow: check.yml
ref: ${{ steps.convert_outputs.outputs.pr_ref }}
- name: Invoke codeql workflow
uses: benc-uk/[email protected]
with:
workflow: codeql-analysis.yml
ref: ${{ steps.convert_outputs.outputs.pr_ref }}
- name: Invoke lint workflow
uses: benc-uk/[email protected]
with:
workflow: lint.yml
ref: ${{ steps.convert_outputs.outputs.pr_ref }}
- name: Invoke pr workflow
uses: benc-uk/[email protected]
with:
workflow: pr.yml
ref: ${{ steps.convert_outputs.outputs.pr_ref }}
- name: Invoke test workflow
uses: benc-uk/[email protected]
with:
workflow: test.yml
ref: ${{ steps.convert_outputs.outputs.pr_ref }}
- name: Invoke todo workflow
uses: benc-uk/[email protected]
with:
workflow: todo.yml
ref: ${{ steps.convert_outputs.outputs.pr_ref }}
- name: Invoke version updates workflow
uses: benc-uk/[email protected]
with:
workflow: version-updates.yml
ref: ${{ steps.convert_outputs.outputs.pr_ref }}
# - run: gh pr review --approve -b "auto-approval for localization sync :3" "$PR_ID"
# env:
# PR_ID: ${{ steps.convert_outputs.outputs.pr_id }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#- name: Invoke checks workflow
#uses: benc-uk/[email protected]
#with:
#workflow: check.yml
#ref: ${{ steps.convert_outputs.outputs.pr_ref }}
#- name: Invoke codeql workflow
#uses: benc-uk/[email protected]
#with:
#workflow: codeql-analysis.yml
#ref: ${{ steps.convert_outputs.outputs.pr_ref }}
#- name: Invoke lint workflow
#uses: benc-uk/[email protected]
#with:
#workflow: lint.yml
#ref: ${{ steps.convert_outputs.outputs.pr_ref }}
#- name: Invoke pr workflow
#uses: benc-uk/[email protected]
#with:
#workflow: pr.yml
#ref: ${{ steps.convert_outputs.outputs.pr_ref }}
#- name: Invoke test workflow
#uses: benc-uk/[email protected]
#with:
#workflow: test.yml
#ref: ${{ steps.convert_outputs.outputs.pr_ref }}
#- name: Invoke todo workflow
#uses: benc-uk/[email protected]
#with:
#workflow: todo.yml
#ref: ${{ steps.convert_outputs.outputs.pr_ref }}
#- name: Invoke version updates workflow
#uses: benc-uk/[email protected]
#with:
#workflow: version-updates.yml
#ref: ${{ steps.convert_outputs.outputs.pr_ref }}
- run: gh pr merge --auto --squash $PR_ID
env:
PR_ID: ${{ steps.convert_outputs.outputs.pr_id }}
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}
- run: gh pr review --approve -b "auto-approval for localization sync :3" "$PR_ID"
env:
PR_ID: ${{ steps.convert_outputs.outputs.pr_id }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/docs-localization-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ jobs:
create_pull_request: false
config: "crowdin.yml"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}
4 changes: 3 additions & 1 deletion .github/workflows/version-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ jobs:
runs-on: ubuntu-latest
if:
${{ github.actor == 'dependabot[bot]' || github.actor == 'crowdin-bot' ||
github.actor == 'Crowdin Bot' }}
github.actor == 'Crowdin Bot' || github.actor_id == 106019021 ||
github.actor_id == 58779643 }}
continue-on-error: true
steps:
- run: gh pr review --approve "$PR_URL"
env:
Expand Down

0 comments on commit 61a7a3f

Please sign in to comment.