Skip to content

Commit c52a273

Browse files
Fix = write the JSON arrays using the <<EOF syntax.
1 parent 1ae6d4e commit c52a273

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.github/workflows/docker-compose-ci.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,21 @@ jobs:
7373
web_tags+=( "ghcr.io/${OWNER_LC}/${REPO_SLUG}/web:${ver}" "ghcr.io/${OWNER_LC}/${REPO_SLUG}/web:${minor}" )
7474
fi
7575
76-
# emit JSON arrays
77-
printf 'user_tags_json=%s\n' "$(printf '%s\n' "${user_tags[@]}" | jq -R . | jq -s .)" >> "$GITHUB_OUTPUT"
78-
printf 'api_tags_json=%s\n' "$(printf '%s\n' "${api_tags[@]}" | jq -R . | jq -s .)" >> "$GITHUB_OUTPUT"
79-
printf 'web_tags_json=%s\n' "$(printf '%s\n' "${web_tags[@]}" | jq -R . | jq -s .)" >> "$GITHUB_OUTPUT"
76+
user_json="$(printf '%s\n' "${user_tags[@]}" | jq -R . | jq -s .)"
77+
api_json="$(printf '%s\n' "${api_tags[@]}" | jq -R . | jq -s .)"
78+
web_json="$(printf '%s\n' "${web_tags[@]}" | jq -R . | jq -s .)"
79+
80+
{
81+
echo "user_tags_json<<EOF"
82+
echo "${user_json}"
83+
echo "EOF"
84+
echo "api_tags_json<<EOF"
85+
echo "${api_json}"
86+
echo "EOF"
87+
echo "web_tags_json<<EOF"
88+
echo "${web_json}"
89+
echo "EOF"
90+
} >> "$GITHUB_OUTPUT"
8091
8192
- name: Login to GHCR
8293
uses: docker/login-action@v3
@@ -97,7 +108,8 @@ jobs:
97108
with:
98109
path: /tmp/.buildx-cache
99110
key: ${{ runner.os }}-buildx-${{ github.sha }}
100-
restore-keys: ${{ runner.os }}-buildx-
111+
restore-keys: |
112+
${{ runner.os }}-buildx-
101113
102114
- name: Bake and Push (multi-arch)
103115
uses: docker/bake-action@v5

0 commit comments

Comments
 (0)