Created
February 27, 2023 08:43
-
-
Save tuananh/d5715ffab6af5eb7c9908c00f956a47b to your computer and use it in GitHub Desktop.
cilium melange
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
package: | |
name: cilium-cli | |
version: 0.13.0 | |
epoch: 0 | |
description: CLI to install, manage & troubleshoot Kubernetes clusters running Cilium | |
target-architecture: | |
- all | |
copyright: | |
- license: Apache-2.0 | |
paths: | |
- "*" | |
dependencies: | |
runtime: | |
- ca-certificates-bundle | |
environment: | |
contents: | |
packages: | |
- ca-certificates-bundle | |
- busybox | |
- go | |
- build-base | |
- glibc-dev | |
pipeline: | |
- uses: git-checkout | |
with: | |
repository: https://github.com/cilium/cilium-cli | |
tag: v${{package.version}} | |
destination: cilium-cli | |
expected-commit: ac2eca8005b7bdd677272845b5d0a6261e0e8a37 | |
- assertions: | |
required-steps: 1 | |
pipeline: | |
- if: ${{build.arch}} == 'x86_64' | |
runs: | | |
cd cilium-cli | |
export VERSION=$(git describe --tags --always) | |
mkdir -p release | |
GOARCH=amd64 CGO_ENABLED=0 go build \ | |
-ldflags "-w -s -X 'github.com/cilium/cilium-cli/internal/cli/cmd.Version=${VERSION}'" \ | |
-o release/cilium ./cmd/cilium | |
install -m755 -D release/cilium "${{targets.destdir}}"/usr/bin/cilium-cli | |
- if: ${{build.arch}} == 'aarch64' | |
runs: | | |
cd cilium-cli | |
export VERSION=$(git describe --tags --always) | |
mkdir -p release | |
GOARCH=amd64 CGO_ENABLED=0 go build \ | |
-ldflags "-w -s -X 'github.com/cilium/cilium-cli/internal/cli/cmd.Version=${VERSION}'" \ | |
-o release/cilium ./cmd/cilium | |
install -m755 -D release/cilium "${{targets.destdir}}"/usr/bin/cilium-cli | |
- uses: strip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment