Skip to content

Commit b0d7e28

Browse files
committed
Fix multi-tag format for Docker build
1 parent e4e34ed commit b0d7e28

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: Build and Publish
22

3+
34
on:
45
push:
56
branches:
6-
- '**'
7+
- "**"
78
tags:
8-
- '*'
9+
- "*"
910
pull_request:
1011
branches:
1112
- main
@@ -29,7 +30,7 @@ jobs:
2930
uses: actions/setup-java@v4
3031
with:
3132
distribution: temurin
32-
java-version: '21'
33+
java-version: "21"
3334

3435
- name: Cache Maven repository
3536
uses: actions/cache@v4
@@ -66,7 +67,7 @@ jobs:
6667
PRIMARY_TAG="$IMAGE:sha-$SHORT_SHA"
6768
6869
if [[ "${GITHUB_REF_TYPE}" == "branch" ]]; then
69-
SAFE_BRANCH=$(echo "${GITHUB_REF_NAME}" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g; s/-\{2,\}/-/g; s/^-//; s/-$//')
70+
SAFE_BRANCH=$(echo "${GITHUB_REF_NAME}" | tr '[:upper:]' '[:lower:]' | sed ''s/[^a-z0-9]/-/g; s/-\{2,\}/-/g; s/^-//; s/-$//'')
7071
if [[ -z "$SAFE_BRANCH" ]]; then
7172
SAFE_BRANCH="sha-$SHORT_SHA"
7273
fi
@@ -100,7 +101,8 @@ jobs:
100101
context: .
101102
push: ${{ github.event_name == 'push' }}
102103
load: true
103-
tags: ${{ steps.tags.outputs.list }}
104+
tags: |
105+
${{ steps.tags.outputs.list }}
104106
cache-from: type=gha
105107
cache-to: type=gha,mode=max
106108

0 commit comments

Comments
 (0)