From 23c93011e5e61311a9cf2a175ffb884aee018fbc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= <sumneko@hotmail.com>
Date: Mon, 13 Mar 2023 15:28:59 +0800
Subject: [PATCH] cleanup workflow

---
 .github/workflows/build.yml | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index a881fec..4ac7eec 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -38,13 +38,14 @@ jobs:
         if: ${{ matrix.target == 'linux' }}
         run: |
           apt-get update
-          apt-get install -y software-properties-common curl sudo
+          apt-get install -y software-properties-common
           add-apt-repository -y ppa:ubuntu-toolchain-r/test # For gcc-9 and g++-9
           add-apt-repository -y ppa:git-core/ppa # For git>=2.18.
+          apt-get update
+          apt-get install -y sudo git gcc-9 g++-9
+
           curl -sL https://deb.nodesource.com/setup_14.x -o /tmp/nodesource_setup.sh # For nodejs
           sudo bash /tmp/nodesource_setup.sh
-          apt-get update
-          apt-get install -y git gcc-9 g++-9
           cd ~
           curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh
           sudo bash /tmp/nodesource_setup.sh
@@ -53,8 +54,8 @@ jobs:
       - name: Install aarch64-linux-gnu
         if: ${{ matrix.platform == 'linux-arm64' }}
         run: |
-          sudo apt-get update
-          sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
+          apt-get update
+          apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
 
       - name: Prepare container
         if: ${{ matrix.target == 'linux' }}
-- 
GitLab