Skip to content

Commit 59ba189

Browse files
committed
Update check-stage3.yml
1 parent bc29eba commit 59ba189

2 files changed

Lines changed: 55 additions & 5 deletions

File tree

.github/workflows/check-stage3.yml

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,60 @@ jobs:
143143
run: |
144144
VERSION="${{ needs.generate.outputs.latest_version }}"
145145
echo "Tagging repository and creating release: $VERSION"
146-
set -x
147146
ls -l vmruns vmruns/*
148-
echo todo grab versions and include some verions info in notes, also make sure the artifacts are available.
149147
148+
grep "" vmruns/*/run*txt vmruns/*/run_vars.sh
150149
RELEASE_FILES=()
151-
RELEASE_FILES+=("$expanded")
150+
ASSETS=(vmruns/*/{run_metadata.txt,run_vars.sh,run_full.log})
151+
for asset in "${ASSETS[@]}"; do
152+
[[ -f "$asset" ]] || continue
153+
RUN_ID=$(basename "$(dirname "$asset")")
154+
FILE_ID=$(basename "$asset")
155+
156+
case "$FILE_ID" in
157+
"run_metadata.txt")
158+
printf "\n## 📊 %s - %s\n" "$RUN_ID" "$FILE_ID" >> "$GITHUB_STEP_SUMMARY"
159+
cat "$asset" >> "$GITHUB_STEP_SUMMARY"
160+
printf "\n" >> "$GITHUB_STEP_SUMMARY"
161+
;;
162+
"run_vars.sh")
163+
printf "\n## ⚙️ s - %s\n\n" "$RUN_ID" "$FILE_ID" >> "$GITHUB_STEP_SUMMARY"
164+
echo '```bash' >> "\$GITHUB_STEP_SUMMARY"
165+
cat "\(asset" >> "\)GITHUB_STEP_SUMMARY"
166+
echo '```' >> "$GITHUB_STEP_SUMMARY"
167+
;;
168+
esac
169+
170+
STAGE_PATH="vmruns/${RUN_ID}_${FILE_ID}"
171+
cp "$asset" "$STAGE_PATH"
172+
RELEASE_FILES+=("$STAGE_PATH")
173+
done
174+
175+
for var_file in vmruns/*/run_vars.sh; do
176+
[[ -f "$var_file" ]] || exit 1
177+
source "$var_file"
178+
CLEAN_STAGE3="${STAGE3%.tar.xz}"
179+
if [[ "$CLEAN_STAGE3" != "$VERSION" ]]; then
180+
echo "❌ Stage3 mismatch in $var_file ($CLEAN_STAGE3 != $VERSION)" >&2
181+
exit 1
182+
fi
183+
done
184+
diff vmruns/*/run_vars.sh || { echo "❌ Run missmatch"; exit 1; }
185+
186+
RELEASE_NOTES="release_notes.md"
187+
cat << EOF > "$RELEASE_NOTES"
188+
## 🚀 Install build from $VERSION
189+
* **🌐 iPXE:** \`$IPXE\`
190+
* **💿 Media:** \`$CDVERSION\`
191+
* **📦 Stage:** \`$STAGE3\`
192+
* **📸 Snapshot:** \`$SNAPSHOT\`
193+
* **🐧 Kernel:** \`$KERNEL\`
194+
EOF
152195
196+
set -x
197+
cat "$RELEASE_NOTES"
153198
ls -l "${RELEASE_FILES[@]}"
154199
echo gh release create "$VERSION" "${RELEASE_FILES[@]}" \
155200
--repo "${{ github.repository }}" \
156-
--title "Gentoo $VERSION" \
157-
--notes "Automated test ok of Gentoo $VERSION"
201+
--title "$VERSION" \
202+
--notes-file "$RELEASE_NOTES"

run_test_published_auto.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ QEMU_RUN_PID=$!
8383
declare -p IPXE >> $ENV_FILE
8484
MSGQUEUE+=("$(tee -a $META_FILE <<< $'\xF0\x9F\x8C\x90 '"$(date) iPXE Version: ${IPXE}")")
8585
;;
86+
"install-"*"-image.squashfs :"*)
87+
CDVERSION="${line%-image.squashfs*}"
88+
declare -p CDVERSION >> $ENV_FILE
89+
MSGQUEUE+=("$(tee -a $META_FILE <<< $'\xF0\x9F\x92\xBF '"$(date) CD Version: ${CDVERSION}")")
90+
;;
8691
*"Welcome to Gentoo-HAI Dracut"*)
8792
MSGQUEUE+=("$(tee -a $META_FILE <<< $'\xF0\x9F\x8E\xAF '"$(date) Initial boot OK")")
8893
;;

0 commit comments

Comments
 (0)