From c628be197878afcc9a114d60b385f58d5e3e5181 Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Tue, 19 Apr 2022 19:45:22 -0400 Subject: [PATCH] github-actions/pnl-ci-docs: Only remove zero tag if it was successfully added This avoids cascading error if the workload fails before the tag was added. Signed-off-by: Jan Vesely --- .github/workflows/pnl-ci-docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pnl-ci-docs.yml b/.github/workflows/pnl-ci-docs.yml index 5223af16b06..30f750212a6 100644 --- a/.github/workflows/pnl-ci-docs.yml +++ b/.github/workflows/pnl-ci-docs.yml @@ -96,6 +96,7 @@ jobs: # set it to a fixed value to prevent polluting the diff # This needs to be done after installing PNL # to not interfere with dependency resolving + id: add_zero_tag if: github.event_name == 'pull_request' run: git tag --force 'v0.0.0.0' @@ -105,7 +106,7 @@ jobs: - name: Remove git tag # The generated docs include PNL version, # This was set to a fixed value to prevent polluting the diff - if: github.event_name == 'pull_request' && always() + if: steps.add_zero_tag.conclusion == 'success' run: git tag -d 'v0.0.0.0' - name: Upload Documentation