Prepare v0.8.0 (#672)

* chore: Bump cdk dependency to v0.8.0

* chore: add docker publish to ci

* chore: add doc test build to ci
This commit is contained in:
thesimplekid
2025-03-24 18:40:08 +00:00
committed by GitHub
parent b3ae76d6c7
commit c63fc02a5a
20 changed files with 160 additions and 81 deletions

View File

@@ -5,6 +5,8 @@ on:
branches: [main]
pull_request:
branches: [main]
release:
types: [created]
env:
CARGO_TERM_COLOR: always
@@ -388,4 +390,20 @@ jobs:
- name: Stop and clean up Docker Compose
run: |
docker compose -f misc/keycloak/docker-compose-recover.yml down
doc-tests:
name: "Documentation Tests"
runs-on: ubuntu-latest
timeout-minutes: 15
needs: pre-commit-checks
steps:
- name: checkout
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v11
- name: Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v6
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Run doc tests
run: nix develop -i -L .#stable --command cargo test --doc

60
.github/workflows/docker-publish.yml vendored Normal file
View File

@@ -0,0 +1,60 @@
name: Publish Docker Image
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: 'Tag to build and publish'
required: true
default: 'latest'
env:
REGISTRY: docker.io
IMAGE_NAME: thesimplekid/cdk-mintd
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ github.event_name == 'release' }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=ref,event=branch
type=ref,event=pr
type=sha
${{ github.event.inputs.tag != '' && github.event.inputs.tag || '' }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max