From 04c8ed5726931a730c795310cff14a9df3ed335b Mon Sep 17 00:00:00 2001 From: Francis <15894826+francisfuzz@users.noreply.github.com> Date: Fri, 10 Dec 2021 18:08:00 -0800 Subject: [PATCH] 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). --- .github/workflows/create-translation-batch-pr.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create-translation-batch-pr.yml b/.github/workflows/create-translation-batch-pr.yml index 6b7edffb10..791999bf03 100644 --- a/.github/workflows/create-translation-batch-pr.yml +++ b/.github/workflows/create-translation-batch-pr.yml @@ -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