Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- develop
- release/**
- brapi-server-v2
tags:
- 'v*'

workflow_dispatch:
inputs:
Expand Down Expand Up @@ -107,11 +109,18 @@ jobs:
TAGS=""
IS_PR_BUILD="false"

if [[ -n "$PR_NUMBER" ]]; then

if [[ "${{ github.ref_type }}" == "tag" ]]; then
TAG_NAME="${{ github.ref_name }}"
TAGS="$IMAGE_BASE_NAME:$TAG_NAME"
echo "This is a release tag build: $TAG_NAME"

elif [[ -n "$PR_NUMBER" ]]; then
echo "This is a PR build. Setting PR-specific tag."
PR_TAG="$IMAGE_BASE_NAME:pr-$PR_NUMBER"
TAGS="$PR_TAG"
IS_PR_BUILD="true"

else
echo "This is a regular build. Setting standard tags."
RUN_NUMBER_TAG="$IMAGE_BASE_NAME:${{ github.run_number }}"
Expand Down
Loading