Skip to content

Commit

Permalink
Fiks henting av tags i prod workflow (v2) (#803)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjerga authored Dec 9, 2024
1 parent 9793c23 commit 497d961
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 497d961

Please sign in to comment.