ci: make sure checkouts fetch tags

This commit is contained in:
sithlord48 2024-10-13 19:20:50 -04:00 committed by Chris Rizzitello
parent 24db09b023
commit e4b348c183
4 changed files with 48 additions and 16 deletions

View file

@ -140,9 +140,14 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version # the fetch-tags option for checkout does not work correctly so we need todo this
uses: ./.github/actions/get-version - name: Fetch tags
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git fetch --tags --force
- name: Cache vcpkg dir - name: Cache vcpkg dir
uses: actions/cache@v4 uses: actions/cache@v4
@ -232,9 +237,14 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version # the fetch-tags option for checkout does not work correctly so we need todo this
uses: ./.github/actions/get-version - name: Fetch tags
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git fetch --tags --force
- name: Cache deps dir - name: Cache deps dir
uses: actions/cache@v4 uses: actions/cache@v4
@ -307,12 +317,14 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version # the fetch-tags option for checkout does not work correctly so we need todo this
uses: ./.github/actions/get-version - name: Fetch tags
run: |
- name: Config Git safe dir git config --global --add safe.directory $GITHUB_WORKSPACE
run: git config --global --add safe.directory $GITHUB_WORKSPACE git fetch --tags --force
- name: Install dependencies - name: Install dependencies
run: ./scripts/install_deps.py ${{ matrix.distro.extra-dep-args }} run: ./scripts/install_deps.py ${{ matrix.distro.extra-dep-args }}
@ -370,6 +382,14 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
# the fetch-tags option for checkout does not work correctly so we need todo this
- name: Fetch tags
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git fetch --tags --force
- name: Build on FreeBSD - name: Build on FreeBSD
if: ${{ matrix.distro.name == 'freebsd' }} if: ${{ matrix.distro.name == 'freebsd' }}

View file

@ -21,9 +21,14 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Config Git safe dir # the fetch-tags option for checkout does not work correctly so we need todo this
run: git config --global --add safe.directory $GITHUB_WORKSPACE - name: Fetch tags
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git fetch --tags --force
- name: Install dependencies - name: Install dependencies
run: ./scripts/install_deps.py run: ./scripts/install_deps.py

View file

@ -25,11 +25,13 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
# Fetch all history for SonarScanner blame data
fetch-depth: 0 fetch-depth: 0
- name: Config Git safe dir # the fetch-tags option for checkout does not work correctly so we need todo this
run: git config --global --add safe.directory $GITHUB_WORKSPACE - name: Fetch tags
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git fetch --tags --force
- name: Install dependencies - name: Install dependencies
run: | run: |

View file

@ -13,9 +13,14 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Config Git safe dir # the fetch-tags option for checkout does not work correctly so we need todo this
run: git config --global --add safe.directory $GITHUB_WORKSPACE - name: Fetch tags
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git fetch --tags --force
- name: Install dependencies - name: Install dependencies
run: | run: |