Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9567bbf3aa |
No files matched your search
@@ -178,6 +178,55 @@ jobs:
|
|||||||
dir:/workspace -o spdx-json \
|
dir:/workspace -o spdx-json \
|
||||||
> dist/crank-community-${IMAGE_TAG}-sbom.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
|
- name: Load deployment secrets from OpenBao
|
||||||
env:
|
env:
|
||||||
BAO_ADDR: ${{ secrets.BAO_ADDR }}
|
BAO_ADDR: ${{ secrets.BAO_ADDR }}
|
||||||
@@ -243,51 +292,3 @@ jobs:
|
|||||||
- name: Show release bundle summary
|
- name: Show release bundle summary
|
||||||
run: |
|
run: |
|
||||||
ls -lh dist
|
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})"))
|
.unwrap_or_else(|error| format!("unformatted-utc ({error})"))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// One timed `resources/list`, built directly on `reqwest` so transport/timeout/HTTP failures are
|
/// A single timed `resources/list` call, built directly on `reqwest` so transport/timeout/HTTP
|
||||||
/// recorded as outcomes instead of aborting the run.
|
/// failures are recorded as outcomes instead of aborting the run.
|
||||||
async fn timed_list(
|
async fn timed_list(
|
||||||
endpoint: &ResourceEndpoint,
|
endpoint: &ResourceEndpoint,
|
||||||
revision: &'static str,
|
revision: &'static str,
|
||||||
|
|||||||
Reference in new issue
Block a user