diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 8cafba338b..da6f9052d0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -103,29 +103,111 @@ jobs: max_attempts: 3 command: mise run test dockerhub: - runs-on: ubuntu-latest + runs-on: ${{ matrix.platform.os }} + strategy: + fail-fast: false + matrix: + platform: + - os: ubuntu-latest + tag_suffix: amd64 + platform: linux/amd64 + - os: ubuntu-24.04-arm + tag_suffix: arm64 + platform: linux/arm64 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Prepare + run: | + platform="${{ matrix.platform.platform }}" + echo "PLATFORM_PAIR=${platform//\//-}" >> "$GITHUB_ENV" + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: | + jdxcode/mise + ghcr.io/jdx/mise + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: jdxcode + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Log in to Docker Hub + - name: Build and push by digest + id: build + uses: docker/build-push-action@v6 + with: + platforms: ${{ matrix.platform.platform }} + labels: ${{ steps.meta.outputs.labels }} + outputs: type=image,"name=jdxcode/mise,ghcr.io/jdx/mise",push-by-digest=true,name-canonical=true,push=true + - name: Export digest + run: | + mkdir -p ${{ runner.temp }}/digests + digest="${{ steps.build.outputs.digest }}" + touch "${{ runner.temp }}/digests/${digest#sha256:}" + - name: Upload digest + uses: actions/upload-artifact@v4 + with: + name: digests-${{ env.PLATFORM_PAIR }} + path: ${{ runner.temp }}/digests/* + if-no-files-found: error + retention-days: 1 + merge: + runs-on: ubuntu-latest + needs: [dockerhub] + steps: + - name: Download digests + uses: actions/download-artifact@v4 + with: + path: ${{ runner.temp }}/digests + pattern: digests-* + merge-multiple: true + - name: Login to Docker Hub uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKER_USERNAME }} + username: jdxcode password: ${{ secrets.DOCKER_PASSWORD }} - - name: Extract metadata (tags, labels) for Docker + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: jdx + password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta id: meta uses: docker/metadata-action@v5 with: - images: jdxcode/mise - - name: Build and push Docker image - uses: docker/build-push-action@v6 - with: - context: . - file: ./Dockerfile - platforms: linux/amd64,linux/arm64 - push: true - tags: jdxcode/mise:latest,jdxcode/mise:${{ github.ref_name }} - labels: ${{ steps.meta.outputs.labels }} + images: | + jdxcode/mise + ghcr.io/jdx/mise + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + - name: Create manifest list and push + working-directory: ${{ runner.temp }}/digests + run: | + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf 'jdxcode/mise:${{ github.ref_name }}@sha256:%s ' *) + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf 'ghcr.io/jdx/mise:${{ github.ref_name }}@sha256:%s ' *) + docker buildx imagetools create -t jdxcode/mise:latest \ + $(printf 'jdxcode/mise:${{ github.ref_name }}@sha256:%s ' *) + docker buildx imagetools create -t ghcr.io/jdx/mise:latest \ + $(printf 'ghcr.io/jdx/mise:${{ github.ref_name }}@sha256:%s ' *) + - name: Inspect image + run: | + docker buildx imagetools inspect jdxcode/mise:${{ steps.meta.outputs.version }} + docker buildx imagetools inspect ghcr.io/jdx/mise:${{ steps.meta.outputs.version }} diff --git a/docs/registry.md b/docs/registry.md index 0af2856e54..732869aa01 100644 --- a/docs/registry.md +++ b/docs/registry.md @@ -242,7 +242,7 @@ You can also specify the full name for a tool using `mise use aqua:1password/cli | esy | [asdf:mise-plugins/mise-esy](https://github.com/mise-plugins/mise-esy) | | etcd | [aqua:etcd-io/etcd](https://github.com/etcd-io/etcd) [asdf:particledecay/asdf-etcd](https://github.com/particledecay/asdf-etcd) [vfox:mise-plugins/vfox-etcd](https://github.com/mise-plugins/vfox-etcd) | | evans | [aqua:ktr0731/evans](https://github.com/ktr0731/evans) [asdf:goki90210/asdf-evans](https://github.com/goki90210/asdf-evans) | -| eza | [aqua:eza-community/eza](https://github.com/eza-community/eza) [asdf:mise-plugins/mise-eza](https://github.com/mise-plugins/mise-eza) [cargo:eza](https://crates.io/crates/eza) | +| eza | [asdf:mise-plugins/mise-eza](https://github.com/mise-plugins/mise-eza) [cargo:eza](https://crates.io/crates/eza) | | fd | [aqua:sharkdp/fd](https://github.com/sharkdp/fd) [ubi:sharkdp/fd](https://github.com/sharkdp/fd) [asdf:https://gitlab.com/wt0f/asdf-fd](https://gitlab.com/wt0f/asdf-fd) | | ffmpeg | [asdf:mise-plugins/mise-ffmpeg](https://github.com/mise-plugins/mise-ffmpeg) | | figma-export | [ubi:RedMadRobot/figma-export](https://github.com/RedMadRobot/figma-export) [asdf:younke/asdf-figma-export](https://github.com/younke/asdf-figma-export) | diff --git a/man/man1/mise.1 b/man/man1/mise.1 index c8ce805b76..6ff93589f5 100644 --- a/man/man1/mise.1 +++ b/man/man1/mise.1 @@ -6,15 +6,7 @@ mise \- The front\-end to your dev env .SH SYNOPSIS \fBmise\fR [\fB\-C\fR|\fB\-\-cd\fR] [\fB\-E\fR|\fB\-\-env\fR] [\fB\-j\fR|\fB\-\-jobs\fR] [\fB\-\-output\fR] [\fB\-\-raw\fR] [\fB\-\-no\-config\fR] [\fB\-y\fR|\fB\-\-yes\fR] [\fB\-q\fR|\fB\-\-quiet\fR] [\fB\-\-silent\fR] [\fB\-v\fR|\fB\-\-verbose\fR]... [\fB\-h\fR|\fB\-\-help\fR] [\fITASK\fR] [\fITASK_ARGS\fR] [\fITASK_ARGS_LAST\fR] [\fIsubcommands\fR] .SH DESCRIPTION -.PP -mise is a tool for managing runtime versions. https://github.com/jdx/mise -.PP -It\*(Aqs a replacement for tools like nvm, nodenv, rbenv, rvm, chruby, pyenv, etc. -that works for any language. It\*(Aqs also great for managing linters/tools like -jq and shellcheck. -.PP -It is inspired by asdf and uses asdf\*(Aqs plugin ecosystem under the hood: -https://asdf\-vm.com/ +mise manages dev tools, runs tasks, and managed env vars. https://github.com/jdx/mise .SH OPTIONS .TP \fB\-C\fR, \fB\-\-cd\fR=\fIDIR\fR diff --git a/mise.lock b/mise.lock index fe990483ab..03e4c80b70 100644 --- a/mise.lock +++ b/mise.lock @@ -1,12 +1,9 @@ [tools.actionlint] -version = "1.7.6" +version = "1.7.7" backend = "aqua:rhysd/actionlint" [tools.actionlint.checksums] -actionlint-linux-x86_64 = "sha256:bf567ce887b8b045fdd6001411aea1971e90a49e4f5172801fb648902843c9ec" -actionlint-macos-aarch64 = "sha256:baa69aa6ae140310d9d86127d916abd42cd2ad446aef0a04f2a7fe7f54da7d67" -"actionlint_1.7.6_darwin_arm64.tar.gz" = "sha256:9a7c9cb2b627bb137ef68742eead2dd5b78f3ddc44876e84c37d323ba28b4710" -"actionlint_1.7.6_linux_amd64.tar.gz" = "sha256:5d1a70d9de15fee5371e6f9e20cc29b284e814d6ee1b882f9749e91caf716eba" +"actionlint_1.7.7_darwin_arm64.tar.gz" = "sha256:2693315b9093aeacb4ebd91a993fea54fc215057bf0da2659056b4bc033873db" [tools.bun] version = "1.1.44" diff --git a/mise.usage.kdl b/mise.usage.kdl index 3ce0eb644e..a8fc32f435 100644 --- a/mise.usage.kdl +++ b/mise.usage.kdl @@ -2,7 +2,7 @@ min_usage_version "1.3" name mise bin mise about "The front-end to your dev env" -long_about "\nmise is a tool for managing runtime versions. https://github.com/jdx/mise\n\nIt's a replacement for tools like nvm, nodenv, rbenv, rvm, chruby, pyenv, etc.\nthat works for any language. It's also great for managing linters/tools like\njq and shellcheck.\n\nIt is inspired by asdf and uses asdf's plugin ecosystem under the hood:\nhttps://asdf-vm.com/" +long_about "mise manages dev tools, runs tasks, and managed env vars. https://github.com/jdx/mise" usage "Usage: mise [OPTIONS] [TASK] [COMMAND]" flag "-C --cd" help="Change directory before running command" global=#true { arg diff --git a/packaging/mise/Dockerfile b/packaging/mise/Dockerfile index 778973f167..7f0236b423 100644 --- a/packaging/mise/Dockerfile +++ b/packaging/mise/Dockerfile @@ -1,6 +1,9 @@ # syntax=docker/dockerfile:1 FROM rust AS builder LABEL maintainer="jdx" +LABEL org.opencontainers.image.source=https://github.com/jdx/mise +LABEL org.opencontainers.image.description="mise is a tool for managing your development environment" +LABEL org.opencontainers.image.licenses=MIT WORKDIR /usr/src/mise COPY . /usr/src/mise/ diff --git a/src/cli/mod.rs b/src/cli/mod.rs index f00e8d3a5f..cd4c016370 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -411,15 +411,8 @@ impl Cli { } } -const LONG_ABOUT: &str = " -mise is a tool for managing runtime versions. https://github.com/jdx/mise - -It's a replacement for tools like nvm, nodenv, rbenv, rvm, chruby, pyenv, etc. -that works for any language. It's also great for managing linters/tools like -jq and shellcheck. - -It is inspired by asdf and uses asdf's plugin ecosystem under the hood: -https://asdf-vm.com/"; +const LONG_ABOUT: &str = + "mise manages dev tools, runs tasks, and managed env vars. https://github.com/jdx/mise"; const LONG_TASK_ABOUT: &str = r#"Task to run. diff --git a/xtasks/lint-fix.sh b/xtasks/lint-fix.sh index 0b51312988..760246c3d1 100755 --- a/xtasks/lint-fix.sh +++ b/xtasks/lint-fix.sh @@ -14,7 +14,7 @@ prettier -w $(git ls-files '*.yml' '*.yaml') prettier -w . markdownlint --fix . taplo fmt -SHELLCHECK_OPTS="--exclude=SC1090" actionlint +SHELLCHECK_OPTS="--exclude=SC1090 --exclude=SC2046" actionlint toml-sort -i settings.toml --spaces-indent-inline-array 4 toml-sort -i registry.toml --spaces-indent-inline-array 4 diff --git a/xtasks/lint/actionlint b/xtasks/lint/actionlint index b60ff64b1a..26a58e3310 100755 --- a/xtasks/lint/actionlint +++ b/xtasks/lint/actionlint @@ -1,5 +1,5 @@ #!/usr/bin/env bash set -euo pipefail -export SHELLCHECK_OPTS="--exclude=SC1090" +export SHELLCHECK_OPTS="--exclude=SC1090 --exclude=SC2046" actionlint