From 37baeca0310c5d73ffd759a8fc3d7c098c32342b Mon Sep 17 00:00:00 2001 From: Ilja Malachowski Date: Fri, 15 Nov 2024 17:57:49 +0100 Subject: [PATCH 1/2] Add Dockerfile and instructions to use it. --- Dockerfile | 19 +++++++++++++++++++ README.md | 17 +++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0b48c6f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM golang:1.23-alpine AS builder + +RUN apk --no-cache add ca-certificates + +WORKDIR /usr/src/app + +# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change +COPY go.mod go.sum ./ +RUN go mod download && go mod verify + +COPY . . +RUN go build -v -o /usr/src/app/dist/ ./... + +FROM scratch AS runtime + +COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ +COPY --from=builder /usr/src/app/dist/hcloud-upload-image /bin/hcloud-upload-image + +ENTRYPOINT ["/bin/hcloud-upload-image"] diff --git a/README.md b/README.md index c57257f..c212426 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,23 @@ Use your preferred wrapper to install: yay -S hcloud-upload-image-bin ``` +#### Docker + +You can build a Docker image by cli command(from the root of this repo): + +```shell +docker build -t hcloud-upload-image . +``` + +And the next, you can use it like this(for example): + +```shell +docker run -ti --rm -e HCLOUD_TOKEN="" \ + --image-url "https://example.com/disk-image-x86.raw.bz2" \ + --architecture x86 \ + --compression bz2 +``` + #### `go install` If you already have a recent Go toolchain installed, you can build & install the binary from source: From b328867f6b9b965dcd581cb6f6907dae364faa7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Sat, 7 Dec 2024 01:57:59 +0100 Subject: [PATCH 2/2] chore(main): release 0.3.1 (#48) :robot: I have created a release *beep* *boop* ---
0.3.1 ## [0.3.1](https://github.com/apricote/hcloud-upload-image/compare/v0.3.0...v0.3.1) (2024-12-07) ### Bug Fixes * **cli:** local install fails because of go.mod replace ([#47](https://github.com/apricote/hcloud-upload-image/issues/47)) ([66dc5f7](https://github.com/apricote/hcloud-upload-image/commit/66dc5f70b604ed3ee964576d74f94bdcea710c95))
hcloudimages: 0.3.1 ## [0.3.1](https://github.com/apricote/hcloud-upload-image/compare/hcloudimages/v0.3.0...hcloudimages/v0.3.1) (2024-12-07) ### Bug Fixes * **cli:** local install fails because of go.mod replace ([#47](https://github.com/apricote/hcloud-upload-image/issues/47)) ([66dc5f7](https://github.com/apricote/hcloud-upload-image/commit/66dc5f70b604ed3ee964576d74f94bdcea710c95))
--- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .github/release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ hcloudimages/CHANGELOG.md | 7 +++++++ internal/version/version.go | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/release-please-manifest.json b/.github/release-please-manifest.json index e8d09de..a3e5bb7 100644 --- a/.github/release-please-manifest.json +++ b/.github/release-please-manifest.json @@ -1 +1 @@ -{".":"0.3.0","hcloudimages":"0.3.0"} +{".":"0.3.1","hcloudimages":"0.3.1"} diff --git a/CHANGELOG.md b/CHANGELOG.md index 8da820e..f278fae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.3.1](https://github.com/apricote/hcloud-upload-image/compare/v0.3.0...v0.3.1) (2024-12-07) + + +### Bug Fixes + +* **cli:** local install fails because of go.mod replace ([#47](https://github.com/apricote/hcloud-upload-image/issues/47)) ([66dc5f7](https://github.com/apricote/hcloud-upload-image/commit/66dc5f70b604ed3ee964576d74f94bdcea710c95)) + ## [0.3.0](https://github.com/apricote/hcloud-upload-image/compare/v0.2.1...v0.3.0) (2024-06-23) diff --git a/hcloudimages/CHANGELOG.md b/hcloudimages/CHANGELOG.md index e781178..f5711d3 100644 --- a/hcloudimages/CHANGELOG.md +++ b/hcloudimages/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.3.1](https://github.com/apricote/hcloud-upload-image/compare/hcloudimages/v0.3.0...hcloudimages/v0.3.1) (2024-12-07) + + +### Bug Fixes + +* **cli:** local install fails because of go.mod replace ([#47](https://github.com/apricote/hcloud-upload-image/issues/47)) ([66dc5f7](https://github.com/apricote/hcloud-upload-image/commit/66dc5f70b604ed3ee964576d74f94bdcea710c95)) + ## [0.3.0](https://github.com/apricote/hcloud-upload-image/compare/hcloudimages/v0.2.0...hcloudimages/v0.3.0) (2024-06-23) diff --git a/internal/version/version.go b/internal/version/version.go index 1ea172b..780018a 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -2,7 +2,7 @@ package version var ( // version is a semver version (https://semver.org). - version = "0.3.0" // x-release-please-version + version = "0.3.1" // x-release-please-version // versionPrerelease is a semver version pre-release identifier (https://semver.org). //