Skip to content

Commit a92a749

Browse files
committed
fix(ci): fix release flatten-dist same-file error and docker-build valori-ui pull failure
1 parent 4bbaf95 commit a92a749

2 files changed

Lines changed: 13 additions & 12 deletions

File tree

.github/workflows/docker-build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,13 @@ jobs:
133133
image: valori-node:ci
134134
EOF
135135
136+
# Only start the "valori" service — valori-ui's image isn't
137+
# published to GHCR for this CI run, and `up -d` with no service
138+
# argument would try (and fail) to pull it too.
136139
docker compose \
137140
-f docker-compose.yml \
138141
-f /tmp/ci-image-override.yml \
139-
up -d
142+
up -d valori
140143
141144
# Wait up to 60 s for the single node to become healthy.
142145
for i in $(seq 1 12); do

.github/workflows/release.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -146,17 +146,15 @@ jobs:
146146
- name: Flatten dist directory
147147
run: |
148148
# download-artifact@v4 nests each artifact as dist/<artifact-name>/<file>.
149-
# When the artifact name matches the file name the src and dst are the
150-
# same inode — skip the copy in that case to avoid the "same file" error.
151-
find dist/ -mindepth 2 -type f | while read f; do
152-
dest="dist/$(basename "$f")"
153-
src_inode=$(stat -c '%i' "$f" 2>/dev/null || stat -f '%i' "$f")
154-
dst_inode=$(stat -c '%i' "$dest" 2>/dev/null || stat -f '%i' "$dest" 2>/dev/null || echo "none")
155-
if [ "$src_inode" != "$dst_inode" ]; then
156-
cp "$f" "$dest"
157-
fi
158-
done
159-
find dist/ -mindepth 1 -maxdepth 1 -type d -delete
149+
# When the artifact name matches the file name, "dist/<name>" already
150+
# exists as a directory — `cp src dist/<name>` then resolves into that
151+
# directory and lands back on the exact same path it started from
152+
# ("same file" error). Stage into a fresh directory and swap it in
153+
# instead of copying file-by-file into the (possibly colliding) dist/.
154+
mkdir -p dist-flat
155+
find dist/ -mindepth 2 -type f -exec cp {} dist-flat/ \;
156+
rm -rf dist
157+
mv dist-flat dist
160158
161159
- name: Install cosign
162160
uses: sigstore/cosign-installer@v3

0 commit comments

Comments
 (0)