Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions krane.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package:
name: krane
version: "0.20.7"
epoch: 0
description: Drop-in replacement for crane with built-in cloud workload identity auth.
copyright:
- license: Apache-2.0
dependencies:
runtime:
- ca-certificates-bundle

environment:
contents:
packages:
- busybox
- ca-certificates-bundle
- go
environment:
CGO_ENABLED: "0"

pipeline:
- uses: git-checkout
with:
repository: https://github.com/google/go-containerregistry
tag: v${{package.version}}
expected-commit: e075f209120b2467fd1b7d24727f1890a0edb74a

- uses: go/build
with:
modroot: cmd/krane
packages: .
ldflags: |
-buildid= \
-X github.com/google/go-containerregistry/cmd/crane/cmd.Version=${{package.version}} \
-X github.com/google/go-containerregistry/pkg/v1/remote/transport.Version=${{package.version}}
output: krane

update:
enabled: true
github:
identifier: google/go-containerregistry
strip-prefix: v

test:
environment:
contents:
packages:
- jq
pipeline:
- uses: test/tw/ver-check
with:
bins: ${{package.name}}
version-flag: version
- uses: test/tw/help-check
with:
bins: ${{package.name}}
- name: Fetch and verify manifest
runs: |
krane manifest chainguard/static | jq '.schemaVersion' | grep '2' || exit 1
- name: List tags for a public image
runs: |
krane ls chainguard/static | grep -E 'latest|v[0-9]+.[0-9]+.[0-9]+' || exit 1
- name: Validate image existence
runs: |
krane digest chainguard/static:latest && echo "Image exists" || exit 1
- name: Pull and save an image locally
runs: |
krane pull chainguard/static:latest static_latest.tar || exit 1
[ -f static_latest.tar ] || exit 1