diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 37702cb..f9eb8e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,12 @@ jobs: curl https://mise.run | sh mise install + - name: 🔑 Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: ☁️ Release run: | mise release diff --git a/.goreleaser.yml b/.goreleaser.yml index 2b04ee4..a22d049 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -25,6 +25,26 @@ builds: goarch: [ amd64, arm64 ] goamd64: [ v1, v3 ] +dockers_v2: + - id: skpr-cli + dockerfile: Dockerfile + ids: + - skpr-cli + - skpr-rsh + images: + - "ghcr.io/skpr/cli" + - "docker.io/skpr/cli" + tags: + - "latest" + - "{{ .Commit }}" + - "{{ .Tag }}" + sbom: false + flags: + - "--pull" + platforms: + - linux/amd64 + - linux/arm64 + archives: - id: nix builds: [ skpr-cli, skpr-rsh ] diff --git a/.mise.toml b/.mise.toml index 52a2225..2d12aac 100644 --- a/.mise.toml +++ b/.mise.toml @@ -43,6 +43,7 @@ description = "Release the command line interface" run = "goreleaser" depends = ["vendor"] -[tasks.snapshot-release] +[tasks.snapshot] description = "Create a snapshot release for local testing" run = "goreleaser --snapshot --clean --verbose" +depends = ["vendor"] diff --git a/Dockerfile b/Dockerfile index e7a8ab7..f63525e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ -FROM alpine:3.21 +FROM alpine:3.23 RUN apk --no-cache add bash ca-certificates git openssh-client curl rsync docker-cli jq yq -COPY skpr skpr-rsh /usr/local/bin/ + +ARG TARGETPLATFORM +COPY $TARGETPLATFORM/skpr $TARGETPLATFORM/skpr-rsh /usr/local/bin/ CMD ["skpr"]