From: Lucas De Marchi Date: Fri, 12 Jul 2024 15:58:32 +0000 (-0500) Subject: ci: Replace package installation with local action X-Git-Tag: v33~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=da6345d17ac5797bebfb4eccaf8bbc31301c442e;p=thirdparty%2Fkmod.git ci: Replace package installation with local action Separate the package installation step with a local action so it's easier to support more versions and distros. Signed-off-by: Lucas De Marchi Reviewed-by: Reviewed-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/44 --- diff --git a/.github/actions/setup-ubuntu/action.yml b/.github/actions/setup-ubuntu/action.yml new file mode 100644 index 00000000..554d261f --- /dev/null +++ b/.github/actions/setup-ubuntu/action.yml @@ -0,0 +1,22 @@ +name: 'setup Ubuntu' +description: 'Setup an Ubuntu container for running CI' +runs: + using: 'composite' + steps: + - name: Install dependencies + shell: bash + run: | + sudo apt-get update + sudo apt-get install --yes \ + build-essential \ + autoconf \ + automake \ + gtk-doc-tools \ + libssl-dev \ + liblzma-dev \ + libssl-dev \ + libtool \ + libzstd-dev \ + linux-headers-generic \ + scdoc \ + zstd diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 79eff14b..fa9c9b94 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,23 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - - name: install dependencies - run: | - sudo apt-get update - sudo apt-get install --yes \ - build-essential \ - autoconf \ - automake \ - gtk-doc-tools \ - libssl-dev \ - liblzma-dev \ - libssl-dev \ - libtool \ - libzstd-dev \ - linux-headers-generic \ - scdoc \ - zstd \ + - uses: ./.github/actions/setup-ubuntu - name: configure run: |