]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
ci: install git and checkout using it
authorEmil Velikov <emil.l.velikov@gmail.com>
Mon, 2 Sep 2024 17:58:35 +0000 (18:58 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 3 Sep 2024 17:01:21 +0000 (12:01 -0500)
Atm the checkout action pulls the whole repo as tarball, since git is
missing. Since we install packages via local actions, we need to first
do an initial sparse checkout, install the packages (git including) and
do a proper second checkout.

At which point, the second checkout action claims to set safe.directory
(it's the default) although in practise we need to do it again. Perhaps
it's getting tripped by our initial sparse checkout?

Either way, explicitly set the option so that git just works.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/86
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
.github/actions/setup-alpine/action.yml
.github/actions/setup-archlinux/action.yml
.github/actions/setup-debian/action.yml
.github/actions/setup-fedora/action.yml
.github/actions/setup-ubuntu/action.yml
.github/workflows/main.yml

index 1c7eae96494104dc03d9bf2653d95fdfa17dc642..434398f428e95f60d5a1e82a6fa028759505578a 100644 (file)
@@ -12,6 +12,7 @@ runs:
           automake \
           bash \
           build-base \
+          git \
           gtk-doc \
           libtool \
           linux-edge-dev \
index 10be56b90f1d9da8d05910c96702e6341254dbd9..989739aca2e5c5820561d951a537f09dec6c3e84 100644 (file)
@@ -17,4 +17,5 @@ runs:
         pacman --noconfirm -Su \
           linux-headers \
           scdoc \
+          git \
           gtk-doc
index a0c45803e20d5b31ac41f883eb10a2f963e750bd..b60cd2eff75423a5d256ec88295e9aa5ad98555d 100644 (file)
@@ -11,6 +11,7 @@ runs:
           build-essential \
           autoconf \
           automake \
+          git \
           gtk-doc-tools \
           libssl-dev \
           liblzma-dev \
index a2612e4681ff95637a33c757dc2f1d8ae3205504..0d963bfe635492b0464cc340c721f84230cf9f29 100644 (file)
@@ -17,6 +17,7 @@ runs:
           xz-devel \
           libzstd-devel \
           openssl-devel \
+          git \
           gtk-doc \
           libtool \
           scdoc
index f60cb1de43fb2f8243f4124ae02c05061bbbefe2..62456d7d50014aeeefb3034aa7b01fe4c05a1c49 100644 (file)
@@ -11,6 +11,7 @@ runs:
           build-essential \
           autoconf \
           automake \
+          git \
           gtk-doc-tools \
           libssl-dev \
           liblzma-dev \
index 55cf83792ced32d71d107507109ae69ff731a9e5..d91155883aa3be22f5d0f18209f634dd1d1d4fdd 100644 (file)
@@ -34,7 +34,10 @@ jobs:
       image: ${{ matrix.container }}
 
     steps:
-      - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+      - name: Sparse checkout the local actions
+        uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+        with:
+          sparse-checkout: .github
 
       - uses: ./.github/actions/setup-ubuntu
         if: ${{ startsWith(matrix.container, 'ubuntu') }}
@@ -47,6 +50,15 @@ jobs:
       - uses: ./.github/actions/setup-debian
         if: ${{ startsWith(matrix.container, 'debian') }}
 
+      - name: Checkout the whole project
+        uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+
+      - name: Set the environment
+        run: |
+          # The second checkout above claims to set safe.directory, yet it
+          # doesn't quite work. Perhaps our double/sparse checkout is to blame?
+          git config --global --add safe.directory '*'
+
       - name: configure
         run: |
           mkdir build