fix(release): retain latest five CNB releases per family

This commit is contained in:
t8y2
2026-07-30 09:09:26 +08:00
parent 28476358ff
commit 442b9338b0
6 changed files with 293 additions and 0 deletions
+13
View File
@@ -779,3 +779,16 @@ jobs:
args+=(--overwrite-existing --prune-assets)
fi
node .github/scripts/sync-cnb-release.mjs "${args[@]}"
- name: Keep latest five versioned agent releases in CNB
if: ${{ matrix.tag != 'agents-latest' }}
continue-on-error: true
env:
CNB_TOKEN: ${{ secrets.CNB_TOKEN }}
CURRENT_TAG: ${{ matrix.tag }}
run: |
node .github/scripts/cleanup-cnb-releases.mjs \
--current-tag "$CURRENT_TAG" \
--tag-pattern '^agents-v[0-9]+[.][0-9]+[.][0-9]+$' \
--retain 5 \
--apply
+12
View File
@@ -681,6 +681,18 @@ jobs:
--github-release "$RUNNER_TEMP/github-release/release.json" \
--assets-dir "$RUNNER_TEMP/release-assets"
- name: Keep latest five app releases in CNB
continue-on-error: true
env:
CNB_TOKEN: ${{ secrets.CNB_TOKEN }}
CURRENT_TAG: ${{ github.ref_name }}
run: |
node .github/scripts/cleanup-cnb-releases.mjs \
--current-tag "$CURRENT_TAG" \
--tag-pattern '^v[0-9]+[.][0-9]+[.][0-9]+([.-][0-9A-Za-z.-]+)?$' \
--retain 5 \
--apply
docker:
runs-on: ubuntu-latest
strategy: