Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit c40c691

Browse files
committed
Added docker-setup for bootstrapping #6345
1 parent ef3fcd8 commit c40c691

File tree

5 files changed

+44
-7
lines changed

5 files changed

+44
-7
lines changed

.github/workflows/build-go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323

2424
- name: Build binary
2525
run: |
26-
make docker-setup
26+
make bin/docker-setup

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ jobs:
6868
6969
- name: Build binary
7070
run: |
71-
make docker-setup
71+
make bin/docker-setup
7272
7373
- name: Create checksum
7474
run: |
75-
sha256sum docker-setup >docker-setup.sha256
75+
sha256sum bin/docker-setup >bin/docker-setup.sha256
7676
7777
- name: Create changelog
7878
env:
@@ -116,4 +116,4 @@ jobs:
116116
bodyFile: body.txt
117117
prerelease: ${{ needs.prepare.outputs.prerelease }}
118118
replacesArtifacts: true
119-
artifacts: "docker-setup,docker-setup.sha256"
119+
artifacts: "bin/docker-setup,bin/docker-setup.sha256"

make/go.mk

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ GO_VERSION = $(shell git describe --tags --abbrev=0)
55
go-info:
66
@echo "GO_VERSION: $(GO_VERSION)"
77

8-
docker-setup: make/go.mk $(GO_SOURCES) ; $(info $(M) Building docker-setup version $(GO_VERSION)...)
9-
@CGO_ENABLED=0 \
10-
go build -buildvcs=false -ldflags "-X main.version=$(GO_VERSION)" -o docker-setup ./cmd/docker-setup
8+
bin/docker-setup: bin/docker-setup-linux-$(ALT_ARCH)
9+
10+
bin/docker-setup-linux-$(ALT_ARCH):bin/docker-setup-linux-%: make/go.mk $(GO_SOURCES) ; $(info $(M) Building docker-setup version $(GO_VERSION) for $(ALT_ARCH)...)
11+
@\
12+
CGO_ENABLED=0 \
13+
GOOS=linux \
14+
GOARCH=$* \
15+
go build -buildvcs=false -ldflags "-w -s -X main.version=$(GO_VERSION)" -o bin/docker-setup-$${GOOS}-$${GOARCH} ./cmd/docker-setup
1116

1217
.PHONY:
1318
go-deps:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#syntax=docker/dockerfile:1.5.2
2+
3+
ARG ref=main
4+
5+
FROM ghcr.io/nicholasdille/docker-setup/base:${ref} AS prepare
6+
ARG name
7+
ARG version
8+
RUN <<EOF
9+
curl --silent --location --fail --output "${prefix}${target}/bin/docker-setup" \
10+
"https://github.com/nicholasdille/docker-setup/releases/download/v${version}/docker-setup"
11+
chmod +x "${prefix}${target}/bin/docker-setup"
12+
13+
"${prefix}${target}/bin/docker-setup" completion bash >"${prefix}${target}/share/bash-completion/completions/docker-setup"
14+
"${prefix}${target}/bin/docker-setup" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/docker-setup.fish"
15+
"${prefix}${target}/bin/docker-setup" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_docker-setup"
16+
EOF

tools/docker-setup/manifest.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: docker-setup
2+
version: "2.2.11"
3+
check: ""
4+
platforms:
5+
- linux/amd64
6+
#- linux/arm64
7+
tags:
8+
- category/operations
9+
- lang/go
10+
- type/cli
11+
homepage: https://github.com/nicholasdille/docker-setup
12+
description: Install, configure and update container tools
13+
renovate:
14+
datasource: github-releases
15+
package: nicholasdille/docker-setup
16+
extractVersion: ^v(?<version>.+?)$

0 commit comments

Comments
 (0)