Skip to content

Commit 04c8ed5

Browse files
authored
fix: verify Crowdin CLI download before installing (#23515)
This change uses the suggested steps in https://support.crowdin.com/cli-tool/#debian, with a slight modification in creating the `crowdin.list` file in the `/etc/apt/sources.list.d` directory. This approach creates a new file for `crowdin.list`, then pipes the content to `tee -a`. Credits go to [this Ask Ubuntu thread reply](https://askubuntu.com/questions/185268/permission-denied-etc-apt-sources-list/185270#185270).
1 parent daa1677 commit 04c8ed5

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/create-translation-batch-pr.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,15 @@ jobs:
6262
- name: Remove unwanted git hooks
6363
run: rm .git/hooks/post-checkout
6464

65-
- name: Install Crowdin CLI
65+
# https://support.crowdin.com/cli-tool/#debian
66+
- name: Download and install the public signing key
67+
run: wget -qO - https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
68+
- name: Create the crowdin.list file in the /etc/apt/sources.list.d directory
6669
run: |
67-
wget https://artifacts.crowdin.com/repo/deb/crowdin3.deb -O /tmp/crowdin.deb
68-
sudo dpkg -i /tmp/crowdin.deb
70+
sudo touch /etc/apt/sources.list.d/crowdin.list
71+
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list.d/crowdin.list
72+
- name: Install the Crowdin CLI Debian Package
73+
run: sudo apt-get update && sudo apt-get install crowdin3
6974

7075
# Delete empty source files that would be rejected by Crowdin breaking the workflow
7176
- name: Remove empty source files

0 commit comments

Comments
 (0)