Last active
January 17, 2026 21:03
-
-
Save aelindeman/0b93fb8a92dbc9d65a5841031f9b21c5 to your computer and use it in GitHub Desktop.
Multi-arch oras artifact pipeline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -eu -o pipefail | |
| repo="localhost:5000/path/to/thing" | |
| tags="${BUILDKITE_COMMIT:0:7},${BUILDKITE_BRANCH//[^A-Za-z0-9-]/-}" | |
| [[ "$BUILDKITE_BRANCH" == "$BUILDKITE_PIPELINE_DEFAULT_BRANCH" ]] && tags+=",$(cat .release-version),latest" | |
| digests=() | |
| buildkite-agent artifact download "thing-*.tar.gz" . | |
| for artifact in thing-*.tar.gz; do | |
| platform="${artifact#thing-}" | |
| platform="${platform%.tar.gz}" | |
| platform="${platform/-//}" | |
| digests+=("$(oras push --artifact-platform="$platform" "$repo" "$artifact" --format=go-template="{{.digest}}")") | |
| done | |
| oras manifest index create "$repo:$tags" "${digests[@]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment