diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 6ecbfd7..922d1cf 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -9,7 +9,7 @@ on: push: branches: - feat-docker - tags: + tags: - "v*" jobs: @@ -23,23 +23,24 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to DockerHub + - name: 'Login to GitHub Container Registry' uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} - - name: Extract version from tag + - name: Extract version from package.json id: extract_version run: | - VERSION=${GITHUB_REF#refs/tags/} - VERSION=${VERSION#v} - VERSION=0.1.3 + VERSION=$(jq -r '.version' package.json) + echo "Version extracted: $VERSION" echo "VERSION=$VERSION" >> $GITHUB_ENV - name: Build and push Docker image run: | docker build --build-arg VERSION=${{ env.VERSION }} \ - --push -t varunraj/immich-power-tools:${{ env.VERSION }} \ - -t varunraj/immich-power-tools:latest . - \ No newline at end of file + -t ghcr.io/${{ github.repository }}:${{ env.VERSION }} \ + -t ghcr.io/${{ github.repository }}:latest . + docker push ghcr.io/${{ github.repository }}:latest + docker push ghcr.io/${{ github.repository }}:${{ env.VERSION }} \ No newline at end of file diff --git a/README.md b/README.md index a9025ac..dd34e29 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,10 @@ Recently I've migrated my entire Google photos library to Immich, I was able to #### 🐬 Using Docker -You can run the project using `Dockerfile` and `docker-compose.yml` file. +You can run the project using `docker-compose.yml` file. ```bash +wget https://raw.githubusercontent.com/varun-raj/immich-power-tools/main/docker-compose.yml docker compose up -d ``` diff --git a/docker-compose.build.yml b/docker-compose.build.yml new file mode 100644 index 0000000..23e85e3 --- /dev/null +++ b/docker-compose.build.yml @@ -0,0 +1,12 @@ +version: '3.8' + +services: + immich_power_tools: + container_name: immich_power_tools + build: + context: . + dockerfile: Dockerfile + ports: + - "3000:3000" + env_file: + - .env diff --git a/docker-compose.yml b/docker-compose.yml index 3e1a0b8..cd03dc9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,8 +2,8 @@ version: '3.8' services: immich_power_tools: - image: varunraj/immich-power-tools container_name: immich_power_tools + image: ghcr.io/varun-raj/immich_power_tools:latest ports: - "3000:3000" env_file: