#!/bin/bash

if [[ -n "$CI_COMMIT_TAG" ]]; then
  echo "$CI_COMMIT_TAG"
elif [[ -n "$CI_MERGE_REQUEST_IID" ]]; then
  echo "refs/merge-requests/$CI_MERGE_REQUEST_IID/merge"
else
  echo "${CI_DEFAULT_BRANCH:-main}"
fi
