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).
This commit is contained in:
@@ -62,10 +62,15 @@ jobs:
|
||||
- name: Remove unwanted git hooks
|
||||
run: rm .git/hooks/post-checkout
|
||||
|
||||
- name: Install Crowdin CLI
|
||||
# https://support.crowdin.com/cli-tool/#debian
|
||||
- name: Download and install the public signing key
|
||||
run: wget -qO - https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
|
||||
- name: Create the crowdin.list file in the /etc/apt/sources.list.d directory
|
||||
run: |
|
||||
wget https://artifacts.crowdin.com/repo/deb/crowdin3.deb -O /tmp/crowdin.deb
|
||||
sudo dpkg -i /tmp/crowdin.deb
|
||||
sudo touch /etc/apt/sources.list.d/crowdin.list
|
||||
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list.d/crowdin.list
|
||||
- name: Install the Crowdin CLI Debian Package
|
||||
run: sudo apt-get update && sudo apt-get install crowdin3
|
||||
|
||||
# Delete empty source files that would be rejected by Crowdin breaking the workflow
|
||||
- name: Remove empty source files
|
||||
|
||||
Reference in New Issue
Block a user