From 9c832665f92db4a0f14c34783d6f53d61e1b7908 Mon Sep 17 00:00:00 2001 From: Nikita Smirnov <46124551+Nikita-Smirnov-Exactpro@users.noreply.github.com> Date: Mon, 2 Oct 2023 14:34:09 +0400 Subject: [PATCH] Repair ci - added get-previous tag job (#70) --- .github/workflows/dev-release-build.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dev-release-build.yml b/.github/workflows/dev-release-build.yml index b304f7c4..d54ac43f 100644 --- a/.github/workflows/dev-release-build.yml +++ b/.github/workflows/dev-release-build.yml @@ -11,9 +11,26 @@ jobs: uses: th2-net/.github/.github/workflows/compound-prebuild-java-workflow.yml@main with: project-path: . + get-previous-tag: + name: Get previous tag + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 100 + fetch-tags: true + - id: previous-tag + run: | + FOUND_TAG=$(git tag --list --sort=-version:refname '*.*.*-dev' | head --lines 1) + echo "result=$FOUND_TAG" >> "$GITHUB_OUTPUT" + [[ -z $(echo "$FOUND_TAG") ]] && { echo "No tag found..."; exit 1; } || { echo "Tag found: ${FOUND_TAG}"; } + outputs: + tag: ${{ steps.previous-tag.outputs.result }} changes: name: Collect changed files runs-on: ubuntu-20.04 + needs: + - get-previous-tag outputs: app: ${{ steps.filter.outputs.app }} grpc: ${{ steps.filter.outputs.grpc }} @@ -22,7 +39,7 @@ jobs: - uses: dorny/paths-filter@v2 id: filter with: - base: ${{ github.ref }} + base: ${{ needs.get-previous-tag.outputs.tag }} filters: | app: - 'gradle.properties'