From f5dc8f997838e7593ceb27ca694a2c3376a29a61 Mon Sep 17 00:00:00 2001 From: Ernestas Kulik Date: Sat, 29 Jul 2023 12:29:51 +0300 Subject: [PATCH] workflows: build: Install git before checkout If git is not available, the checkout action checks out code using the REST API, which only includes the source. Building the Python module depends on having git version information. --- .github/workflows/build.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2f30688..10bacc1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,11 +43,27 @@ jobs: fail-fast: false matrix: os: [ "alpine", "archlinux", "fedora", "ubuntu" ] + include: + - install_git_cmd: apk add git + os: alpine + - install_git_cmd: pacman -Sy --noconfirm git + os: archlinux + - install_git_cmd: dnf --assumeyes install git + os: fedora + - install_git_cmd: | + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get --assume-yes install git + os: ubuntu container: image: ${{ matrix.os }} steps: + # https://github.com/actions/checkout/issues/335 + - name: Install git + run: ${{ matrix.install_git_cmd }} + - name: Check out source uses: actions/checkout@v3