Skip to content

Commit 43ce04b

Browse files
fix: extract skipped_modules.json from correct image path in container build
1 parent 76ed6fb commit 43ce04b

1 file changed

Lines changed: 9 additions & 14 deletions

File tree

.github/workflows/container-build.yaml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,15 @@ jobs:
7979
--opt build-arg:GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
8080
$PARAMS \
8181
--output type=local,dest=build-output
82-
if [ -d build-output/data/cache ]; then
83-
rm -rf website/data/cache
84-
mkdir -p website/data/cache
85-
cp -a build-output/data/cache/. website/data/cache/
86-
fi
87-
# Extract skipped_modules.json for validation
88-
if [ -f build-output/data/skipped_modules.json ]; then
89-
mkdir -p website/data
90-
cp build-output/data/skipped_modules.json website/data/skipped_modules.json
91-
else
92-
# Create empty skipped_modules.json if pipeline didn't create it
93-
mkdir -p website/data
94-
echo '[]' > website/data/skipped_modules.json
95-
fi
82+
# The local exporter writes the final image filesystem; our website
83+
# data lives under /usr/share/nginx/website (see container/Dockerfile).
84+
# The pipeline always writes both of these files, so a missing file
85+
# is a real error and should fail the build.
86+
WEBSITE_DATA="build-output/usr/share/nginx/website/data"
87+
rm -rf website/data/cache
88+
mkdir -p website/data/cache
89+
cp -a "$WEBSITE_DATA/cache/." website/data/cache/
90+
cp "$WEBSITE_DATA/skipped_modules.json" website/data/skipped_modules.json
9691
rm -rf build-output
9792
- name: Upload pipeline data for validation
9893
if: always()

0 commit comments

Comments
 (0)