From 46fda6922ea46f875b791a22eb08c924640f282a Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 10:25:41 +0000 Subject: [PATCH 1/2] 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`. --- .github/workflows/docker-publish.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index cb760b9a..3b91617c 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -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 From d4e7e0b3c0d6c369781be1d3ddf1045f4fcc9af1 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 10:30:19 +0000 Subject: [PATCH 2/2] feat: Build from source with versioned Docker tagging This change introduces a comprehensive Docker build process and a GitHub Actions workflow to publish versioned images to Docker Hub. - A new `Dockerfile` builds the application from the local source code, ensuring any project modifications are included in the image. The build process is modeled after the `linuxserver/grocy` image for consistency. - The Docker image is configured to use Chinese (`zh_CN`) as the default language. - The GitHub Actions workflow in `.github/workflows/docker-publish.yml` is configured to: - Build and push the image automatically on pushes to the `master` branch. - Read the application version from `version.json`. - Generate semantic version tags for the Docker image (e.g., `latest`, `v4.5.0`, `v4.5`, `v4`). - The `README.md` has been updated with instructions for using the new custom-built Docker image.