Merge pull request #4 from nishizhen/feature/docker-publish-workflow

feat: Add Dockerfile and GitHub Actions for automated publishing
This commit is contained in:
nishizhen 2025-08-15 18:31:32 +08:00 committed by GitHub
commit 50c44dadd1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,11 +18,20 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get version
id: version
run: echo "tag=$(jq -r .Version < version.json)" >> $GITHUB_OUTPUT
- name: Extract metadata (tags, labels) for Docker - name: Extract metadata (tags, labels) for Docker
id: meta id: meta
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: nishizhen/anticlockwisegrocy images: nishizhen/anticlockwisegrocy
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}},value=v${{ steps.version.outputs.tag }}
type=semver,pattern={{major}}.{{minor}},value=v${{ steps.version.outputs.tag }}
type=semver,pattern={{major}},value=v${{ steps.version.outputs.tag }}
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v4 uses: docker/build-push-action@v4