From 497d961acbf77996c157c5f12e1f9dacea488b42 Mon Sep 17 00:00:00 2001 From: Mikael Bjerga <6940327+bjerga@users.noreply.github.com> Date: Mon, 9 Dec 2024 15:38:52 +0100 Subject: [PATCH] Fiks henting av tags i prod workflow (v2) (#803) --- .github/workflows/prod.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index 0d6677c6a..9e6e6d6bd 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -20,9 +20,10 @@ jobs: is_deploy_matrix_empty: ${{ steps.set_matrix.outputs.is_deploy_matrix_empty }} steps: - uses: actions/checkout@v4 - with: - fetch-depth: 25 - fetch-tags: true + + # We fetch tags here because 'fetch-tags'-option on checkout-action doesn't work on release + - name: Fetch tags + run: git fetch --depth=1 --tags --quiet - name: Cache gradle wrapper uses: actions/cache@v4 @@ -49,6 +50,7 @@ jobs: PREVIOUS_TAG=$(git tag --sort version:refname | tail -n 2 | head -n 1) # Create a comma-separated list of changed files for use in build.gradle.kts CHANGED_FILES=$(git diff-tree --no-commit-id --name-only -r -m $PREVIOUS_TAG $GITHUB_REF | tr '\r\n' ',' | sed -e 's/,$//' | tr -d '"') + echo Files changed from $PREVIOUS_TAG to $GITHUB_REF are [$CHANGED_FILES] echo "CHANGED_FILES=$CHANGED_FILES" >> $GITHUB_ENV - name: Determine projects to deploy