mirror of
https://github.com/grocy/grocy.git
synced 2026-03-28 07:39:25 +01:00
feat: Implement versioned Docker tagging
This change updates the GitHub Actions workflow to implement a versioned Docker tagging strategy, as requested. - The workflow now reads the version from `version.json`. - It generates semantic version tags (e.g., `v4.5.0`, `v4.5`, `v4`) for the Docker image, in addition to the `latest` tag. - This makes the image tagging consistent with the practices of `linuxserver/grocy`.
This commit is contained in:
parent
2a6efff2e4
commit
46fda6922e
9
.github/workflows/docker-publish.yml
vendored
9
.github/workflows/docker-publish.yml
vendored
|
|
@ -18,11 +18,20 @@ jobs:
|
|||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
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
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
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
|
||||
uses: docker/build-push-action@v4
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user