46b2077f99
Add comprehensive CI/CD pipeline for building and publishing Docker images
to GitHub Container Registry (ghcr.io).
Components:
- build-and-push.yaml: Main workflow for building and pushing images
- Triggers on push to main, tags, PRs, and manual dispatch
- Multi-tag strategy (latest, semver, sha, branch)
- Docker buildx with layer caching
- Automatic GHCR authentication
- Platform: linux/amd64
- release.yaml: Automated GitHub releases on version tags
- Auto-generates release notes from commits
- Creates GitHub release with Docker pull command
- dependabot.yml: Automated dependency updates
- Weekly updates for GitHub Actions
- Weekly updates for Docker base images
- PULL_REQUEST_TEMPLATE.md: PR template with testing checklist
Updated README:
- Add build status badge
- Update image pull instructions
- Reference automated builds
Image tagging strategy:
- main branch → :latest, :main, :main-{sha}
- v1.2.3 tag → :v1.2.3, :1.2, :1, :latest
- PR → :pr-{number}
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
52 lines
1.7 KiB
YAML
52 lines
1.7 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Generate Release Notes
|
|
id: notes
|
|
run: |
|
|
# Get the tag message or generate from commits
|
|
TAG_MESSAGE=$(git tag -l --format='%(contents)' ${{ github.ref_name }})
|
|
if [ -z "$TAG_MESSAGE" ]; then
|
|
# Generate from commit messages since last tag
|
|
PREV_TAG=$(git describe --tags --abbrev=0 ${{ github.ref_name }}^ 2>/dev/null || echo "")
|
|
if [ -z "$PREV_TAG" ]; then
|
|
COMMITS=$(git log --pretty=format:"- %s (%h)" ${{ github.ref_name }})
|
|
else
|
|
COMMITS=$(git log --pretty=format:"- %s (%h)" ${PREV_TAG}..${{ github.ref_name }})
|
|
fi
|
|
NOTES="## Changes\n\n${COMMITS}\n\n## Docker Image\n\n\`\`\`bash\ndocker pull ghcr.io/${{ github.repository }}:${{ github.ref_name }}\n\`\`\`"
|
|
else
|
|
NOTES="${TAG_MESSAGE}\n\n## Docker Image\n\n\`\`\`bash\ndocker pull ghcr.io/${{ github.repository }}:${{ github.ref_name }}\n\`\`\`"
|
|
fi
|
|
echo "notes<<EOF" >> $GITHUB_OUTPUT
|
|
echo -e "$NOTES" >> $GITHUB_OUTPUT
|
|
echo "EOF" >> $GITHUB_OUTPUT
|
|
|
|
- name: Create Release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.ref_name }}
|
|
release_name: Release ${{ github.ref_name }}
|
|
body: ${{ steps.notes.outputs.notes }}
|
|
draft: false
|
|
prerelease: false
|