go-binaries: upload with curl SigV4 (mc download is gone), only own artifacts
Some checks failed
docker-build.yml / go-binaries: upload with curl SigV4 (mc download is gone), only own artifacts (push) Failing after 0s
go-binaries.yml / go-binaries: upload with curl SigV4 (mc download is gone), only own artifacts (push) Failing after 0s
helm-build.yml / go-binaries: upload with curl SigV4 (mc download is gone), only own artifacts (push) Failing after 0s
selftest / build-1 (push) Successful in 31s
selftest / helm (push) Successful in 0s
selftest / build (push) Successful in 1m10s
selftest / docker (push) Successful in 0s
selftest / build (linux/amd64) (push) Successful in 55s
selftest / build (windows/arm64) (push) Successful in 54s
selftest / sbom (push) Successful in 1m13s
selftest / upload (push) Has been skipped
selftest / go (push) Successful in 0s
Some checks failed
docker-build.yml / go-binaries: upload with curl SigV4 (mc download is gone), only own artifacts (push) Failing after 0s
go-binaries.yml / go-binaries: upload with curl SigV4 (mc download is gone), only own artifacts (push) Failing after 0s
helm-build.yml / go-binaries: upload with curl SigV4 (mc download is gone), only own artifacts (push) Failing after 0s
selftest / build-1 (push) Successful in 31s
selftest / helm (push) Successful in 0s
selftest / build (push) Successful in 1m10s
selftest / docker (push) Successful in 0s
selftest / build (linux/amd64) (push) Successful in 55s
selftest / build (windows/arm64) (push) Successful in 54s
selftest / sbom (push) Successful in 1m13s
selftest / upload (push) Has been skipped
selftest / go (push) Successful in 0s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
71da9a2321
commit
e384fe0f76
2 changed files with 8 additions and 6 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# Reusable workflow: cross-compile a Go program for a GOOS/GOARCH matrix, keep the binaries as artifacts,
|
||||
# optionally upload them to S3 (mc), write update.json and generate a CycloneDX SBOM.
|
||||
# optionally upload them to S3 (curl SigV4), write update.json and generate a CycloneDX SBOM.
|
||||
# Usage: see README.md
|
||||
name: go-binaries
|
||||
|
||||
|
|
@ -156,6 +156,7 @@ jobs:
|
|||
- uses: https://code.forgejo.org/forgejo/download-artifact@v4
|
||||
with:
|
||||
path: dist
|
||||
pattern: ${{ inputs.binary-name }}-*
|
||||
merge-multiple: true
|
||||
- name: Upload
|
||||
env:
|
||||
|
|
@ -170,10 +171,11 @@ jobs:
|
|||
RUN: ${{ github.run_number }}
|
||||
run: |
|
||||
set -e
|
||||
curl -fsSL -o /tmp/mc https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x /tmp/mc
|
||||
/tmp/mc alias set minio "$S3_HOST" "$S3_ACCESS_KEY_ID" "$S3_SECRET_ACCESS_KEY" >/dev/null
|
||||
if [ "$UPDATE_JSON" = true ]; then
|
||||
printf '{\n "downloadUrl": "%s/%s/%s-%%GOOS%%-%%GOARCH%%%%FILEXTENSION%%",\n "buildNumber": "%s",\n "time": "%s"\n }\n' \
|
||||
"$URL" "$S3_BUCKET" "$NAME" "$((RUN + OFFSET))" "$(date)" > dist/update.json
|
||||
fi
|
||||
/tmp/mc cp dist/* "minio/$S3_BUCKET/"
|
||||
# mc is no longer downloadable (dl.min.io answers 410): plain curl with SigV4 does the PUT
|
||||
for f in dist/*; do
|
||||
curl -fsS --aws-sigv4 "aws:amz:us-east-1:s3" --user "$S3_ACCESS_KEY_ID:$S3_SECRET_ACCESS_KEY" -T "$f" "${S3_HOST%/}/$S3_BUCKET/$(basename "$f")"
|
||||
done
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ The repository must stay **public**: Forgejo only resolves reusable workflows fr
|
|||
| Workflow | Does |
|
||||
|---|---|
|
||||
| `docker-build.yml` | multi-arch image build with rootless buildkit, push, trivy scan (image and repo) |
|
||||
| `go-binaries.yml` | Go cross-compile matrix (GOOS/GOARCH), artifacts, optional S3 upload (mc), update.json and SBOM |
|
||||
| `go-binaries.yml` | Go cross-compile matrix (GOOS/GOARCH), artifacts, optional S3 upload (curl SigV4), update.json and SBOM |
|
||||
| `helm-build.yml` | helm lint, package and optional push (OCI or helm package registry) |
|
||||
|
||||
## Docker image
|
||||
|
|
@ -85,7 +85,7 @@ jobs:
|
|||
# build-number-var: main.BuildNumber # -X <var>=<run number + build-number-offset>
|
||||
# build-time-var: main.BuildTime
|
||||
# build-number-offset: '244' # last pipeline number of the old GitLab project
|
||||
# upload: true # mc cp to S3 on the default branch
|
||||
# upload: true # PUT to S3 on the default branch
|
||||
# update-json: true # also write and upload update.json
|
||||
# sbom-file: myapp.bom.xml # CycloneDX SBOM artifact
|
||||
secrets:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue