Compare commits

...
Author SHA1 Message Date
bsodfather 9567bbf3aa fix(ci): pass the community scope guard and publish release artifacts before registry steps
CI / Rust Checks (pull_request) Canceled after 38m52s
CI / UI Checks (pull_request) Canceled after 0s
Community Release / release (push) Canceled after 38m39s
CI / Frontend E2E (pull_request) Canceled after 0s
CI / Community Image Smoke (pull_request) Canceled after 0s
CI / Deploy (pull_request) Canceled after 0s
- the community scope guard rejected the innocuous English comment 'One timed
  resources/list' in the Story 3.8 discovery diagnostic (its 'one-time-token'
  marker matches any 'one time' phrase). Reword the comment; no behaviour change.
- move the release artifact publication ahead of the registry/OpenBao steps, so a
  credential problem cannot leave the archives, checksums and SBOM unpublished.
2026-10-25 09:27:55 +00:00
2 changed files with 51 additions and 50 deletions

No files matched your search

+49 -48
View File
@@ -178,6 +178,55 @@ jobs:
dir:/workspace -o spdx-json \
> dist/crank-community-${IMAGE_TAG}-sbom.spdx.json
- name: Write release notes
run: |
set -eu
tag="${{ gitea.ref_name }}"
{
echo "## Crank Community ${tag}"
echo
echo "Source commit: \`$(git rev-parse HEAD)\`"
echo
echo "### Changes"
echo
git log --oneline -25 | sed 's/^/- /'
echo
echo "### Artifacts and checksums"
echo
echo '```'
cat "dist/crank-community-${tag}-checksums.txt"
echo '```'
} > dist/RELEASE-NOTES.md
cat dist/RELEASE-NOTES.md
# The archives, the checksums and the SBOM only exist inside the runner workspace until they are
# attached to the release entry: publish them so a released version keeps its artifacts, and do
# it before the registry steps so an image-credential problem cannot lose them.
- name: Publish artifacts to the Gitea release
env:
RELEASE_TOKEN: ${{ secrets.GITEA_TOKEN }}
FALLBACK_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -eu
tag="${{ gitea.ref_name }}"
token="${RELEASE_TOKEN:-${FALLBACK_TOKEN:-}}"
if [ -z "$token" ]; then
echo "No Gitea token is available to the workflow: the release artifacts stay in the runner workspace" >&2
exit 1
fi
prerelease=""
case "$tag" in
*-*) prerelease="--prerelease" ;;
esac
GITEA_TOKEN="$token" python3 scripts/publish-gitea-release.py \
--api "${{ gitea.server_url }}/api/v1" \
--repo "${{ gitea.repository }}" \
--tag "$tag" \
--title "Crank Community ${tag}" \
--notes-file dist/RELEASE-NOTES.md \
--dist dist \
$prerelease
- name: Load deployment secrets from OpenBao
env:
BAO_ADDR: ${{ secrets.BAO_ADDR }}
@@ -243,51 +292,3 @@ jobs:
- name: Show release bundle summary
run: |
ls -lh dist
- name: Write release notes
run: |
set -eu
tag="${{ gitea.ref_name }}"
{
echo "## Crank Community ${tag}"
echo
echo "Source commit: \`$(git rev-parse HEAD)\`"
echo
echo "### Changes"
echo
git log --oneline -25 | sed 's/^/- /'
echo
echo "### Artifacts and checksums"
echo
echo '```'
cat "dist/crank-community-${tag}-checksums.txt"
echo '```'
} > dist/RELEASE-NOTES.md
cat dist/RELEASE-NOTES.md
# The archives, the checksums and the SBOM only exist inside the runner workspace until they are
# attached to the release entry: publish them so a released version keeps its artifacts.
- name: Publish artifacts to the Gitea release
env:
RELEASE_TOKEN: ${{ secrets.GITEA_TOKEN }}
FALLBACK_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -eu
tag="${{ gitea.ref_name }}"
token="${RELEASE_TOKEN:-${FALLBACK_TOKEN:-}}"
if [ -z "$token" ]; then
echo "No Gitea token is available to the workflow: the release artifacts stay in the runner workspace" >&2
exit 1
fi
prerelease=""
case "$tag" in
*-*) prerelease="--prerelease" ;;
esac
GITEA_TOKEN="$token" python3 scripts/publish-gitea-release.py \
--api "${{ gitea.server_url }}/api/v1" \
--repo "${{ gitea.repository }}" \
--tag "$tag" \
--title "Crank Community ${tag}" \
--notes-file dist/RELEASE-NOTES.md \
--dist dist \
$prerelease
@@ -114,8 +114,8 @@ fn now_rfc3339() -> String {
.unwrap_or_else(|error| format!("unformatted-utc ({error})"))
}
/// One timed `resources/list`, built directly on `reqwest` so transport/timeout/HTTP failures are
/// recorded as outcomes instead of aborting the run.
/// A single timed `resources/list` call, built directly on `reqwest` so transport/timeout/HTTP
/// failures are recorded as outcomes instead of aborting the run.
async fn timed_list(
endpoint: &ResourceEndpoint,
revision: &'static str,