File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -34,18 +34,15 @@ jobs:
3434 - name : Compute version number
3535 id : version-string
3636 run : |
37- if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
38- # For main branch, use semver with -dev suffix
39- echo "tag=0.0.1-dev.$GITHUB_RUN_NUMBER+$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
40- elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
41- # For tags, use the tag as is (assuming it's semver)
37+ if [[ "${{ github.ref }}" == refs/tags/* ]]; then
38+ # For tags, use the tag as is
4239 TAG="${{ github.ref_name }}"
43- echo "tag=$TAG" >> "$GITHUB_OUTPUT"
4440 else
45- # For other branches, use branch name and run number
46- BRANCH="${{ github.ref_name }}"
47- echo "tag=0.0.1-$BRANCH.$GITHUB_RUN_NUMBER+$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
41+ # Fallback to using the input tag
42+ TAG="${{ github.event.inputs.tag }}"
4843 fi
44+ echo "tag=$TAG" >> "$GITHUB_OUTPUT"
45+ echo "Using tag: $TAG"
4946
5047 - name : Log in to the Container registry
5148 uses : docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
You can’t perform that action at this time.
0 commit comments