version: 2 project_name: compute-blade-agent before: hooks: - go mod tidy builds: - id: agent env: &env - CGO_ENABLED=0 goos: &goos - linux goarch: &goarch - arm64 binary: compute-blade-agent dir: ./cmd/agent/ mod_timestamp: "{{ .CommitTimestamp }}" ldflags: &ldflags - -X=main.Version={{.Version}} - -X=main.Commit={{.Commit}} - -X=main.Date={{ .CommitTimestamp }} - id: bladectl env: *env goos: *goos goarch: *goarch binary: bladectl dir: ./cmd/bladectl/ mod_timestamp: "{{ .CommitTimestamp }}" ldflags: *ldflags - id: bladectl_other env: *env goos: - linux - windows - darwin goarch: - amd64 - arm64 ignore: - goos: linux goarch: arm64 binary: bladectl dir: ./cmd/bladectl/ mod_timestamp: "{{ .CommitTimestamp }}" ldflags: *ldflags # Docker image including both agent and bladectl dockers: - id: oci-bundle dockerfile: Dockerfile goos: linux goarch: arm64 ids: - agent - bladectl image_templates: - ghcr.io/compute-blade-community/compute-blade-agent:latest - ghcr.io/compute-blade-community/compute-blade-agent:{{ .Tag }} - ghcr.io/compute-blade-community/compute-blade-agent:v{{ .Major }} build_flag_templates: - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" - "--label=org.opencontainers.image.revision={{.FullCommit}}" - "--label=org.opencontainers.image.version={{.Version}}" - "--platform=linux/arm64" # Sign docker-image with cosign (keyless) docker_signs: - id: oci-bundle-sign artifacts: all args: - "sign" - --oidc-issuer=https://token.actions.githubusercontent.com - --upload=false - "${artifact}" - --yes ids: - oci-bundle # Sign everything else signs: - cmd: cosign signature: "${artifact}.sig" certificate: "${artifact}.pem" args: - sign-blob - --oidc-issuer=https://token.actions.githubusercontent.com - "--output-certificate=${certificate}" - "--output-signature=${signature}" - "${artifact}" artifacts: all # Regular OS packages (for now only systemd based OSes) nfpms: - id: compute-blade-agent package_name: compute-blade-agent ids: - bladectl - agent maintainer: Matthias Riegler description: compute-blade Agent homepage: https://github.com/compute-blade-community/compute-blade-agent vendor: Uptime Industries Inc. license: Apache 2.0 formats: - deb - rpm - archlinux bindir: /usr/bin contents: - src: ./hack/systemd/compute-blade-agent.service dst: /etc/systemd/system/compute-blade-agent.service - src: ./cmd/agent/default-config.yaml dst: /etc/compute-blade-agent/config.yaml type: config - src: ./fanunit.uf2 dst: /usr/share/compute-blade-agent/fanunit.uf2 - id: bladectl package_name: bladectl ids: - bladectl - bladectl_other maintainer: Matthias Riegler description: bladectl homepage: https://github.com/compute-blade-community/compute-blade-agent vendor: Uptime Industries Inc. license: Apache 2.0 formats: - deb - rpm - archlinux bindir: /usr/bin archives: - id: compute-blade-agent ids: - agent - bladectl name_template: 'compute-blade-agent_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}' - id: bladectl ids: - bladectl - bladectl_other name_template: 'bladectl_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}' release: extra_files: - glob: ./fanunit.uf2