Skip to content

feat(config): improve config validation and clarify volume mounts #16

feat(config): improve config validation and clarify volume mounts

feat(config): improve config validation and clarify volume mounts #16

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag:
description: "Tag to release"
required: true
type: string
env:
REGISTRY: ghcr.io
IMAGE_NAME: thevibeworks/ccyolo
jobs:
build-and-push:
name: Build and Push Docker Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=tag
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: build-and-push
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version from tag
id: version
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "version=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
else
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
fi
- name: Update version in claude.sh
run: |
VERSION="${{ steps.version.outputs.version }}"
# Remove 'v' prefix if present
VERSION=${VERSION#v}
sed -i "s/^VERSION=.*/VERSION=\"$VERSION\"/" claude.sh
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add claude.sh
git commit -m "Update version to $VERSION" || echo "No changes to commit"
- name: Generate release notes
id: release_notes
run: |
# Get the previous tag
PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD~1 2>/dev/null || echo "")
# Generate release notes
if [ -n "$PREVIOUS_TAG" ]; then
echo "## Changes since $PREVIOUS_TAG" > release_notes.md
echo "" >> release_notes.md
git log --pretty=format:"- %s (%h)" $PREVIOUS_TAG..HEAD >> release_notes.md
else
echo "## Initial Release" > release_notes.md
echo "" >> release_notes.md
echo "First release of Claude Code YOLO - Docker wrapper for Claude CLI with safe YOLO mode." >> release_notes.md
fi
echo "" >> release_notes.md
echo "## Docker Images" >> release_notes.md
echo "" >> release_notes.md
echo "- \`ghcr.io/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }}\`" >> release_notes.md
echo "- \`ghcr.io/${{ env.IMAGE_NAME }}:latest\`" >> release_notes.md
echo "" >> release_notes.md
echo "## Supported Architectures" >> release_notes.md
echo "" >> release_notes.md
echo "- linux/amd64" >> release_notes.md
echo "- linux/arm64" >> release_notes.md
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.version.outputs.version }}
name: Release ${{ steps.version.outputs.version }}
body_path: release_notes.md
generate_release_notes: true
append_body: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}