Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk committed Apr 30, 2024
1 parent 58b0c32 commit 565f2a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/preview-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
jobs:
build-skip-check:
runs-on: ubuntu-22.04
if: ${{ github.event.workflow_run.conclusion == 'success' && (startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/master')) }}
if: ${{ github.event.workflow_run.conclusion == 'success' && (startsWith(github.event.workflow_run.head_branch, 'refs/tags/') || startsWith(github.event.workflow_run.head_branch, 'refs/heads/master')) }}
outputs:
skip: ${{ steps.skip-check.outputs.skip }}
steps:
Expand Down Expand Up @@ -68,8 +68,9 @@ jobs:
id: version
run: |
set -x
BRANCH=${{ github.event.workflow_run.head_branch }}
VERSION=$(jq -r .version package.json)
if [[ "$GITHUB_REF" =~ ^refs/tags/.* ]]; then
if [[ "$BRANCH" =~ ^refs/tags/.* ]]; then
FULL_VERSION=${VERSION}
else
FULL_VERSION=${VERSION}-b${GITHUB_RUN_ID}.${GITHUB_RUN_NUMBER}
Expand Down

0 comments on commit 565f2a4

Please sign in to comment.