-
-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci skip] fix(actions): shush action
- Loading branch information
Showing
1 changed file
with
30 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,8 @@ jobs: | |
name: "Download localizations from Crowdin" | ||
runs-on: ubuntu-latest | ||
outputs: | ||
pr_ref: pull/${{ steps.crowdin.outputs.pull_request_number }}/head | ||
pr_url: ${{ steps.crowdin.outputs.pull_request_url }} | ||
pr_id: ${{ steps.crowdin.outputs.pull_request_number }} | ||
pr_ref: ${{ steps.convert_outputs.outputs.pr_ref }} | ||
pr_id: ${{ steps.convert_outputs.outputs.pr_id }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: "Install Python" | ||
|
@@ -58,53 +57,72 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }} | ||
- name: "Convert Outputs" | ||
id: convert_outputs | ||
run: | | ||
PR_REF=pull/${{ steps.crowdin.outputs.pull_request_number }}/head | ||
PR_ID=${{ steps.crowdin.outputs.pull_request_number }} | ||
BASE64_PR_REF=$(echo -n "$PR_REF" | base64) | ||
BASE64_PR_ID=$(echo -n "$PR_ID" | base64) | ||
echo "pr_ref=$BASE64_PR_REF" >> $GITHUB_OUTPUT | ||
echo "pr_id=$BASE64_PR_ID" >> $GITHUB_OUTPUT | ||
pr: | ||
permissions: write-all | ||
name: "Trigger PR workflows manually" | ||
needs: [download] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: "Convert Outputs" | ||
id: convert_outputs | ||
run: | | ||
BASE64_PR_REF=${{ needs.download.outputs.pr_ref }} | ||
BASE64_PR_ID=${{ needs.download.outputs.pr_id }} | ||
PR_REF=$(echo -n "$BASE64_PR_REF" | base64 --decode) | ||
PR_ID=$(echo -n "$BASE64_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: ${{ needs.download.outputs.pr_ref }} | ||
ref: ${{ steps.convert_outputs.outputs.pr_ref }} | ||
- name: Invoke codeql workflow | ||
uses: benc-uk/[email protected] | ||
with: | ||
workflow: codeql-analysis.yml | ||
ref: ${{ needs.download.outputs.pr_ref }} | ||
ref: ${{ steps.convert_outputs.outputs.pr_ref }} | ||
- name: Invoke lint workflow | ||
uses: benc-uk/[email protected] | ||
with: | ||
workflow: lint.yml | ||
ref: ${{ needs.download.outputs.pr_ref }} | ||
ref: ${{ steps.convert_outputs.outputs.pr_ref }} | ||
- name: Invoke pr workflow | ||
uses: benc-uk/[email protected] | ||
with: | ||
workflow: pr.yml | ||
ref: ${{ needs.download.outputs.pr_ref }} | ||
ref: ${{ steps.convert_outputs.outputs.pr_ref }} | ||
- name: Invoke test workflow | ||
uses: benc-uk/[email protected] | ||
with: | ||
workflow: test.yml | ||
ref: ${{ needs.download.outputs.pr_ref }} | ||
ref: ${{ steps.convert_outputs.outputs.pr_ref }} | ||
- name: Invoke todo workflow | ||
uses: benc-uk/[email protected] | ||
with: | ||
workflow: todo.yml | ||
ref: ${{ needs.download.outputs.pr_ref }} | ||
ref: ${{ steps.convert_outputs.outputs.pr_ref }} | ||
- name: Invoke version updates workflow | ||
uses: benc-uk/[email protected] | ||
with: | ||
workflow: version-updates.yml | ||
ref: ${{ needs.download.outputs.pr_ref }} | ||
ref: ${{ steps.convert_outputs.outputs.pr_ref }} | ||
- run: gh pr review --approve -b "auto-approval for localization sync :3" "$PR_ID" | ||
env: | ||
PR_ID: ${{ needs.download.outputs.pr_id }} | ||
PR_ID: ${{ steps.convert_outputs.outputs.pr_id }} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
- run: gh pr merge --auto -d --squash $PR_ID | ||
env: | ||
PR_ID: ${{ needs.download.outputs.pr_id }} | ||
PR_ID: ${{ steps.convert_outputs.outputs.pr_id }} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |