Skip to content

chore: release 2025.1.14 (#4197) #825

chore: release 2025.1.14 (#4197)

chore: release 2025.1.14 (#4197) #825

Workflow file for this run

name: docker
on:
push:
tags: ["v*"]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
GITHUB_API_TOKEN: ${{ secrets.MY_RELEASE_PLEASE_TOKEN || github.token }}
jobs:
docker:
name: docker-${{ matrix.flavor }}
strategy:
fail-fast: false
matrix:
flavor:
- alpine
- deb
- rpm
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ghcr.io/jdx/mise:${{ matrix.flavor }}
labels: ${{ steps.meta.outputs.labels }}
file: packaging/${{ matrix.flavor }}/Dockerfile
dev:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ghcr.io/jdx/mise:dev
labels: ${{ steps.meta.outputs.labels }}
file: packaging/dev/Dockerfile
platforms: linux/amd64,linux/arm64
dev-test:
runs-on: ubuntu-latest
container:
image: ghcr.io/jdx/mise:dev
needs: [dev]
steps:
- uses: actions/checkout@v4
- run: cargo install --path . --debug
- uses: actions/cache@v4
with:
key: ${{ runner.os }}-mise-tools-${{ hashFiles('mise.lock') }}
path: |
~/.local/share/mise
~/.cache/mise
- run: mise install
- name: mise run test
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: mise run test
dockerhub:
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: 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: jdxcode
password: ${{ secrets.DOCKER_PASSWORD }}
- 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
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 }}