From c0cfe937266479cdd9c778f358084727de183829 Mon Sep 17 00:00:00 2001 From: Hamish Coleman Date: Mon, 1 Nov 2021 11:39:50 +0000 Subject: [PATCH] How many commits to fetch? Github says 'meh' The right number of commits to fetch is enough to be able to create a `git describe` result - basically back until the most recent parent annotated tag. However, the github action/checkout@v2 only allows a simple number, which is basically the answer to "how long is a piece of string" --- .github/workflows/cmake.yml | 2 ++ .github/workflows/tests.yml | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index c8c8579..4896272 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -25,6 +25,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Fix Checkout run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7310f67..b638a3f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,6 +13,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Fix Checkout run: | git fetch --force --tags @@ -29,6 +31,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Fix Checkout run: | git fetch --force --tags @@ -60,6 +64,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Fix Checkout run: | git fetch --force --tags @@ -130,6 +136,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Fix Checkout run: | git fetch --force --tags @@ -207,6 +215,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Fix Checkout run: | git fetch --force --tags @@ -355,6 +365,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Fix Checkout run: | @@ -391,6 +403,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Fix Checkout run: | @@ -438,6 +452,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Fix Checkout run: | @@ -491,6 +507,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Fix Checkout run: | @@ -548,6 +566,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Fix Checkout run: |