Skip to content

Commit 550aaed

Browse files
authored
Merge pull request #3 from Toob-Boot/dev
feat(ci): add post-publish manifest update and topology trigger to co…
2 parents cebf7bc + 581a20a commit 550aaed

1 file changed

Lines changed: 32 additions & 2 deletions

File tree

.github/workflows/release-compiler.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- "compiler/v*"
77

88
permissions:
9-
contents: read
9+
contents: write
1010

1111
jobs:
1212
build-and-push:
@@ -17,7 +17,8 @@ jobs:
1717
- name: Checkout Code
1818
uses: actions/checkout@v6
1919
with:
20-
fetch-depth: 1
20+
fetch-depth: 0
21+
token: ${{ secrets.RELEASE_TARGET_TOKEN }}
2122

2223
- name: Extract Versions
2324
run: |
@@ -87,3 +88,32 @@ jobs:
8788
docker push "${REPOSITORY}:v${RAW_VERSION}"
8889
docker push "${REPOSITORY}:latest"
8990
echo ">>> [SUCCESS] Image pushed to Docker Hub"
91+
92+
- name: Update Manifest Version
93+
run: |
94+
CURRENT=$(jq -r '.compiler_version' compiler/compiler_manifest.json)
95+
if [ "$CURRENT" = "$RAW_VERSION" ]; then
96+
echo ">>> Manifest already at v${RAW_VERSION}. Skipping."
97+
exit 0
98+
fi
99+
100+
echo ">>> Updating compiler_manifest.json: ${CURRENT} -> ${RAW_VERSION}"
101+
jq --arg v "$RAW_VERSION" '.compiler_version = $v' \
102+
compiler/compiler_manifest.json > tmp_manifest.json \
103+
&& mv tmp_manifest.json compiler/compiler_manifest.json
104+
105+
git config user.name "Toob Release Bot"
106+
git config user.email "release@toob-boot.io"
107+
git add compiler/compiler_manifest.json
108+
git commit -m "chore(compiler): record v${RAW_VERSION} release [skip ci]"
109+
git push origin HEAD:main || echo ">>> Push failed (non-critical). Manual sync needed."
110+
111+
- name: Trigger Topology Update
112+
run: |
113+
echo ">>> Triggering version-index.yml in Toob-Boot/Toob-Registry..."
114+
curl -s -X POST \
115+
-H "Accept: application/vnd.github.v3+json" \
116+
-H "Authorization: token ${{ secrets.RELEASE_TARGET_TOKEN }}" \
117+
https://api.github.com/repos/Toob-Boot/Toob-Registry/actions/workflows/version-index.yml/dispatches \
118+
-d '{"ref":"main"}'
119+

0 commit comments

Comments
 (0)