Skip to content

Commit 6e04270

Browse files
committed
Transition to job matrix approach instead
1 parent 104a6ee commit 6e04270

File tree

1 file changed

+18
-41
lines changed

1 file changed

+18
-41
lines changed

.github/workflows/crowdin-pull.yml

Lines changed: 18 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,19 @@ on:
88

99
jobs:
1010
crowdin-sync:
11-
name: Crowdin Pull - ${{ github.event_name }}
11+
name: Crowdin Pull - ${{ matrix.name }} - ${{ github.event_name }}
1212
runs-on: ubuntu-24.04
13+
strategy:
14+
matrix:
15+
include:
16+
- name: Password Manager
17+
project_id: 269690
18+
config: crowdin-pm.yml
19+
branch: crowdin-pull-bwpm
20+
- name: Authenticator
21+
project_id: 673718
22+
config: crowdin-bwa.yml
23+
branch: crowdin-pull-bwa
1324
steps:
1425
- name: Checkout repo
1526
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -38,52 +49,18 @@ jobs:
3849
env:
3950
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
4051
CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }}
41-
_CROWDIN_PROJECT_ID: "269690"
52+
_CROWDIN_PROJECT_ID: ${{ matrix.project_id }}
4253
with:
43-
config: crowdin-pm.yml
54+
config: ${{ matrix.config }}
4455
upload_sources: false
4556
upload_translations: false
4657
download_translations: true
4758
github_user_name: "bitwarden-devops-bot"
4859
github_user_email: "106330231+bitwarden-devops-bot@users.noreply.github.com"
4960
commit_message: "Pull translations from Crowdin"
50-
localization_branch_name: crowdin-pull-bwpm
61+
localization_branch_name: ${{ matrix.branch }}
5162
create_pull_request: true
52-
pull_request_title: ":shipit: Crowdin Pull - Password Manager"
53-
pull_request_body: ":inbox_tray: New translations for Password Manager received!"
63+
pull_request_title: ":shipit: Crowdin Pull - ${{ matrix.name }}"
64+
pull_request_body: ":inbox_tray: New translations for ${{ matrix.name }} received!"
5465
gpg_private_key: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key }}
55-
gpg_passphrase: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key-passphrase }}
56-
57-
- name: Remove GPG Lock files
58-
run: |
59-
#ref: https://superuser.com/questions/1811518/gpg-stops-doing-anything-on-mac
60-
#ref: https://forum.gnupg.org/t/gpg-stuck-after-any-command/4197/6
61-
62-
ls -l ~/.gnupg/*.lock
63-
echo "-------"
64-
ls -l ~/.gnupg/**/*.lock
65-
echo "-------"
66-
rm -rf ~/.gnupg/*.lock
67-
rm -rf ~/.gnupg/public-keys.d/*.lock
68-
69-
- name: Download translations for Authenticator
70-
uses: crowdin/github-action@b8012bd5491b8aa8578b73ab5b5f5e7c94aaa6e2 # v2.7.0
71-
env:
72-
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
73-
CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }}
74-
_CROWDIN_PROJECT_ID: "673718"
75-
with:
76-
config: crowdin-bwa.yml
77-
upload_sources: false
78-
upload_translations: false
79-
download_translations: true
80-
github_user_name: "bitwarden-devops-bot"
81-
github_user_email: "106330231+bitwarden-devops-bot@users.noreply.github.com"
82-
commit_message: "Pull translations from Crowdin"
83-
localization_branch_name: crowdin-pull-bwa
84-
create_pull_request: true
85-
pull_request_title: ":shipit: Crowdin Pull - Authenticator"
86-
pull_request_body: ":inbox_tray: New translations for Authenticator received!"
87-
gpg_passphrase: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key-passphrase }}
88-
#NOTE - gpg_private_key ommited because they're setup by the previous step.
89-
# This step would fail if they were included again
66+
gpg_passphrase: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key-passphrase }}

0 commit comments

Comments
 (0)