Skip to content

Commit 34feacb

Browse files
committed
ci(ghcr): fix tags format to newline-separated for build-push-action
1 parent ed33452 commit 34feacb

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/publish-ghcr.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,20 @@ jobs:
3838
run: |
3939
IMAGE_OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
4040
IMAGE="ghcr.io/${IMAGE_OWNER}/filmaffinity-scores"
41-
TAGS="${IMAGE}:latest ${IMAGE}:${{ github.sha }}"
41+
# build-push-action requires newline-separated tags
42+
TAGS="${IMAGE}:latest
43+
${IMAGE}:${{ github.sha }}"
4244
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
4345
TAG_NAME=${GITHUB_REF#refs/tags/}
44-
TAGS="${TAGS} ${IMAGE}:${TAG_NAME}"
46+
TAGS="${TAGS}
47+
${IMAGE}:${TAG_NAME}"
4548
fi
4649
echo "image=${IMAGE}" >> "$GITHUB_OUTPUT"
47-
echo "tags=${TAGS}" >> "$GITHUB_OUTPUT"
50+
{
51+
echo "tags<<EOF"
52+
echo "${TAGS}"
53+
echo "EOF"
54+
} >> "$GITHUB_OUTPUT"
4855
4956
- name: Build and push
5057
uses: docker/build-push-action@v4

0 commit comments

Comments
 (0)