Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

ci: add auto-merge after crowdin download and automatic approval (#1632)

Meier Lukasb6733c678c80
diff --git a/.github/workflows/renovate-automatic-approval.yml b/.github/workflows/automatic-approval.yml
similarity index 71%
rename from .github/workflows/renovate-automatic-approval.yml
rename to .github/workflows/automatic-approval.yml
index 4f8020308..20a8ffc76 100644
--- a/.github/workflows/renovate-automatic-approval.yml
+++ b/.github/workflows/automatic-approval.yml
@@ -4,9 +4,9 @@ on:
types: [opened, synchronize]
jobs:
- approve-renovate-prs:
+ approve-automatic-prs:
runs-on: ubuntu-latest
- if: github.actor_id == 158783068 # Id of renovate bot see https://api.github.com/users/homarr-renovate%5Bbot%5D
+ if: github.actor_id == 158783068 || github.actor_id == 190541745 # Id of renovate bot and crowdin bot see https://api.github.com/users/homarr-renovate%5Bbot%5D and https://api.github.com/users/homarr-crowdin%5Bbot%5D
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -18,7 +18,7 @@ jobs:
app_id: ${{ secrets.RENOVATE_APPROVE_APP_ID }}
- name: Install GitHub CLI
run: sudo apt-get install -y gh
- - name: Approve Renovate PRs
+ - name: Approve automatic PRs
env:
GITHUB_TOKEN: ${{ steps.obtainToken.outputs.token }}
run: |
diff --git a/.github/workflows/crowdin-schedule-download.yml b/.github/workflows/crowdin-schedule-download.yml
index 4e07f5a10..15c9aad2e 100644
--- a/.github/workflows/crowdin-schedule-download.yml
+++ b/.github/workflows/crowdin-schedule-download.yml
@@ -21,6 +21,7 @@ jobs:
app_id: ${{ secrets.CROWDIN_APP_ID }}
- name: Download Crowdin translations
+ id: crowdin-download
uses: crowdin/github-action@v2
with:
upload_sources: false
@@ -30,6 +31,7 @@ jobs:
create_pull_request: true
pull_request_title: "chore(lang): updated translations from crowdin"
pull_request_body: "New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)"
+ commit_message: "chore(lang): update translations from crowdin"
pull_request_base_branch_name: "dev"
github_user_name: "Crowdin Homarr"
github_user_email: "190541745+homarr-crowdin[bot]@users.noreply.github.com"
@@ -38,3 +40,9 @@ jobs:
GITHUB_TOKEN: ${{ steps.obtainToken.outputs.token }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
+
+ - name: Enable auto-merge
+ env:
+ GITHUB_TOKEN: ${{ steps.obtainToken.outputs.token }}
+ run: |
+ gh pr merge ${{steps.crowdin-download.pull_request_number}} --auto --merge --squash --delete-branch --title "chore(lang): updated translations from crowdin"
diff --git a/crowdin.yml b/crowdin.yml
index 19fed39f6..77e335a73 100644
--- a/crowdin.yml
+++ b/crowdin.yml
@@ -1,10 +1,3 @@
files:
- source: /packages/translation/src/lang/en.json
translation: /packages/translation/src/lang/%two_letters_code%.json
-
-# Title of pull request and so the commit that will be used for squashed merge commit
-pull_request_title: "chore(lang): updated translations from crowdin"
-
-# Custom commit message that is not only appended
-commit_message: "chore(lang): update translations %original_file_name% from crowdin [skip ci]"
-append_commit_message: false
\ No newline at end of file