grocy/.github/workflows/docker-publish.yml
google-labs-jules[bot] 8b1d8815c0 fix: Correct data directory mapping in Dockerfile
This change fixes a runtime error where the application could not find its `config.php` file.

- The `Dockerfile` is updated to correctly handle the data directory.
- It now removes the source `data` directory and creates a symbolic link from `/app/www/data` to `/config/data`.
- This ensures the container is compatible with the existing data volume structure created by the official `linuxserver/grocy` image, resolving the "config.php not found" error.
2025-08-15 10:59:11 +00:00

43 lines
1.2 KiB
YAML

name: Docker Publish
on:
push:
branches:
- master
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
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
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}