From 0301145f9142495359fa025c2d17324f68b714fd Mon Sep 17 00:00:00 2001 From: Gaurav Mishra Date: Mon, 23 Dec 2024 10:40:03 +0530 Subject: [PATCH] test(actions): git-checkout@v4 Signed-off-by: Gaurav Mishra --- .github/workflows/build-test.yml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index bb7cb3b38d..494359f9a1 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -68,14 +68,32 @@ jobs: } steps: - - name: Setup git + - name: Install git run: | - sudo apt update - sudo apt install -y git + apt-get update + apt-get install -y lsb-release sudo gpg ca-certificates + ## Add repo for latest git + if case "${{ matrix.os }}" in debian*) true;; *) false;; esac; then + echo "deb http://deb.debian.org/debian $(lsb_release -cs)-backports main" > /etc/apt/sources.list.d/backport.list + else + apt-get install -y software-properties-common + add-apt-repository $GIT_REPO -y + fi + apt-get update + apt-get install git -y + # Remove added repos + if case "${{ matrix.os }}" in debian*) true;; *) false;; esac; then + rm /etc/apt/sources.list.d/backport.list + else + add-apt-repository --remove $GIT_REPO -y + fi + apt-get update + env: + GIT_REPO: "ppa:git-core/ppa" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: - fetch-depth: 50 + fetch-depth: 0 - name: Fetch tags run: |