From: Daan De Meyer Date: Tue, 26 Jul 2022 20:36:00 +0000 (+0200) Subject: action: Install dependencies in action repo checkout X-Git-Tag: v14~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2667813ac6d38bd05a2ffd613c2cd91fa0fbb42;p=thirdparty%2Fmkosi.git action: Install dependencies in action repo checkout Since we symlink systemd-nspawn from the build directory to /usr/bin, if the directory that nspawn was built in is cleaned up (e.g. via git clean), systemd-nspawn is gone as well. To make it harder to accidentally delete systemd-nspawn, let's clone and build all the dependencies we compile from source in the repo checkout of the action instead of in the repo of the project that's using the mkosi action. --- diff --git a/action.yaml b/action.yaml index e887afb4c..1fd5940e9 100644 --- a/action.yaml +++ b/action.yaml @@ -21,6 +21,7 @@ runs: - name: Dependencies shell: bash + working-directory: ${{ github.action_path }} run: | sudo apt-get update sudo apt-get install --assume-yes --no-install-recommends \ @@ -42,7 +43,7 @@ runs: mkdir -p $BUILDDIR - sudo -E ${{ github.action_path }}/action/setup-pacman.sh + sudo -E action/setup-pacman.sh sudo chown -R $USER: $BUILDDIR sudo pacman-key --init @@ -73,6 +74,7 @@ runs: # systemd-nspawn from v251 from source. - name: Update systemd-nspawn shell: bash + working-directory: ${{ github.action_path }} run: | echo "deb-src http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs) main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list sudo apt-get update