Skip to content

Commit 068ecf1

Browse files
committed
Use consistent heredoc delimiters in build-fpm.yml and build-cli.yml for GH workflow tag outputs.
1 parent 7b13454 commit 068ecf1

2 files changed

Lines changed: 44 additions & 9 deletions

File tree

.github/workflows/build-cli.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,16 @@ jobs:
5555
fi
5656
ARCH="${ARCH_SUFFIX}"
5757
mapfile -t TAGS_WITH_ARCH < <(for t in "${TAGS[@]}"; do printf "%s:%s-%s\n" "${IMAGE}" "$t" "${ARCH}"; done)
58-
printf "tags_no_arch<<'EOF'\n%s\nEOF\n" "$(printf "%s\n" "${TAGS[@]}")" >> "$GITHUB_OUTPUT"
59-
printf "tags_with_arch<<'EOF'\n%s\nEOF\n" "$(printf "%s\n" "${TAGS_WITH_ARCH[@]}")" >> "$GITHUB_OUTPUT"
58+
{
59+
echo "tags_no_arch<<__NOARCH__"
60+
printf '%s\n' "${TAGS[@]}"
61+
echo "__NOARCH__"
62+
} >> "$GITHUB_OUTPUT"
63+
{
64+
echo "tags_with_arch<<__ARCH__"
65+
printf '%s\n' "${TAGS_WITH_ARCH[@]}"
66+
echo "__ARCH__"
67+
} >> "$GITHUB_OUTPUT"
6068
6169
- uses: docker/build-push-action@v6
6270
with:
@@ -113,8 +121,19 @@ jobs:
113121
fi
114122
ARCH="${ARCH_SUFFIX}"
115123
mapfile -t TAGS_WITH_ARCH < <(for t in "${TAGS[@]}"; do printf "%s:%s-%s\n" "${IMAGE}" "$t" "${ARCH}"; done)
116-
printf "tags_no_arch<<'EOF'\n%s\nEOF\n" "$(printf "%s\n" "${TAGS[@]}")" >> "$GITHUB_OUTPUT"
117-
printf "tags_with_arch<<'EOF'\n%s\nEOF\n" "$(printf "%s\n" "${TAGS_WITH_ARCH[@]}")" >> "$GITHUB_OUTPUT"
124+
# write simple (no-arch) tags
125+
{
126+
echo "tags_no_arch<<__NOARCH__"
127+
printf '%s\n' "${TAGS[@]}"
128+
echo "__NOARCH__"
129+
} >> "$GITHUB_OUTPUT"
130+
131+
# write arch-suffixed tags
132+
{
133+
echo "tags_with_arch<<__ARCH__"
134+
printf '%s\n' "${TAGS_WITH_ARCH[@]}"
135+
echo "__ARCH__"
136+
} >> "$GITHUB_OUTPUT"
118137
119138
- uses: docker/build-push-action@v6
120139
with:
@@ -136,7 +155,7 @@ jobs:
136155

137156
manifest:
138157
runs-on: ubuntu-latest
139-
needs: [build-amd64, build-arm64]
158+
needs: [ build-amd64, build-arm64 ]
140159
strategy:
141160
fail-fast: false
142161
matrix:

.github/workflows/build-fpm.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,16 @@ jobs:
5555
fi
5656
ARCH="${ARCH_SUFFIX}"
5757
mapfile -t TAGS_WITH_ARCH < <(for t in "${TAGS[@]}"; do printf "%s:%s-%s\n" "${IMAGE}" "$t" "${ARCH}"; done)
58-
printf "tags_no_arch<<'EOF'\n%s\nEOF\n" "$(printf "%s\n" "${TAGS[@]}")" >> "$GITHUB_OUTPUT"
59-
printf "tags_with_arch<<'EOF'\n%s\nEOF\n" "$(printf "%s\n" "${TAGS_WITH_ARCH[@]}")" >> "$GITHUB_OUTPUT"
58+
{
59+
echo "tags_no_arch<<__NOARCH__"
60+
printf '%s\n' "${TAGS[@]}"
61+
echo "__NOARCH__"
62+
} >> "$GITHUB_OUTPUT"
63+
{
64+
echo "tags_with_arch<<__ARCH__"
65+
printf '%s\n' "${TAGS_WITH_ARCH[@]}"
66+
echo "__ARCH__"
67+
} >> "$GITHUB_OUTPUT"
6068
6169
- uses: docker/build-push-action@v6
6270
with:
@@ -113,8 +121,16 @@ jobs:
113121
fi
114122
ARCH="${ARCH_SUFFIX}"
115123
mapfile -t TAGS_WITH_ARCH < <(for t in "${TAGS[@]}"; do printf "%s:%s-%s\n" "${IMAGE}" "$t" "${ARCH}"; done)
116-
printf "tags_no_arch<<'EOF'\n%s\nEOF\n" "$(printf "%s\n" "${TAGS[@]}")" >> "$GITHUB_OUTPUT"
117-
printf "tags_with_arch<<'EOF'\n%s\nEOF\n" "$(printf "%s\n" "${TAGS_WITH_ARCH[@]}")" >> "$GITHUB_OUTPUT"
124+
{
125+
echo "tags_no_arch<<__NOARCH__"
126+
printf '%s\n' "${TAGS[@]}"
127+
echo "__NOARCH__"
128+
} >> "$GITHUB_OUTPUT"
129+
{
130+
echo "tags_with_arch<<__ARCH__"
131+
printf '%s\n' "${TAGS_WITH_ARCH[@]}"
132+
echo "__ARCH__"
133+
} >> "$GITHUB_OUTPUT"
118134
119135
- uses: docker/build-push-action@v6
120136
with:

0 commit comments

Comments
 (0)