Skip to content

Commit 553faf1

Browse files
fentasclaude
andcommitted
fix(ci): push OCI layers from bundle/ dir to avoid path prefix
oras was pushing files as bundle/jaml instead of jaml because it was run from the parent dir. Now uses pushd bundle/ so layer titles use bare filenames. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8c66817 commit 553faf1

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎.github/workflows/publish.yaml‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,14 @@ jobs:
197197
curl -sL https://github.com/oras-project/oras/releases/download/v1.2.2/oras_1.2.2_linux_amd64.tar.gz \
198198
| tar xz -C /usr/local/bin oras
199199
200-
# Build the push command with typed layers
200+
# Build the push command with typed layers.
201+
# Run from inside bundle/ so oras uses bare filenames (not bundle/foo)
202+
# in the org.opencontainers.image.title annotation.
203+
pushd bundle > /dev/null
201204
pushargs=()
202-
for f in bundle/*; do
205+
for f in *; do
203206
[[ -f "${f}" ]] || continue
204-
name="$(basename "${f}")"
205-
case "${name}" in
207+
case "${f}" in
206208
*.sh|*.bash)
207209
pushargs+=("${f}:application/vnd.argsh.lib.v1+bash")
208210
;;
@@ -216,18 +218,17 @@ jobs:
216218
pushargs+=("${f}:application/vnd.argsh.test.v1+bats")
217219
;;
218220
sha256sum.txt)
219-
# skip checksum file from OCI
220221
continue
221222
;;
222223
*)
223-
# Extensionless files (like jaml executable) → bash
224224
pushargs+=("${f}:application/vnd.argsh.lib.v1+bash")
225225
;;
226226
esac
227227
done
228228
229229
echo "Pushing ${ref}..."
230230
oras push "${ref}" "${pushargs[@]}"
231+
popd > /dev/null
231232
232233
echo "Tagging ${ref_latest}..."
233234
oras tag "${ref}" "${version}" "latest"

0 commit comments

Comments
 (0)