From ccd4dd1f55d5e1311db8c4898fda6c866c68117c Mon Sep 17 00:00:00 2001 From: Varun Raj Date: Tue, 20 Aug 2024 08:42:13 +0530 Subject: [PATCH] ci: updated docker building and publishing workflow using ga Signed-off-by: Varun Raj --- .github/workflows/docker-release.yml | 37 +++++++++++++++++++ package.json | 2 +- .../PotentialAlbumsAssets.tsx | 17 +++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/docker-release.yml diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml new file mode 100644 index 0000000..b707969 --- /dev/null +++ b/.github/workflows/docker-release.yml @@ -0,0 +1,37 @@ +name: Docker Release + +on: + push: + tags: + - "v*" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract version from tag + id: extract_version + run: | + VERSION=${GITHUB_REF#refs/tags/} + VERSION=${VERSION#v} + echo "VERSION=$VERSION" >> $GITHUB_ENV + + - name: Build and push Docker image + run: | + docker buildx build --build-arg VERSION=${{ env.VERSION }} \ + --platform linux/amd64,linux/arm64 \ + --push -t varunraj/immich-power-tools:${{ env.VERSION }} \ + -t varunraj/immich-power-tools:latest . \ No newline at end of file diff --git a/package.json b/package.json index e41f962..7be2384 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "immich-power-tools", - "version": "0.1.0", + "version": "0.1.3", "private": true, "scripts": { "dev": "next dev", diff --git a/src/components/albums/potential-albums/PotentialAlbumsAssets.tsx b/src/components/albums/potential-albums/PotentialAlbumsAssets.tsx index 9ba09db..4a297a9 100644 --- a/src/components/albums/potential-albums/PotentialAlbumsAssets.tsx +++ b/src/components/albums/potential-albums/PotentialAlbumsAssets.tsx @@ -6,6 +6,7 @@ import React, { useEffect, useMemo, useState } from "react"; import { Gallery } from "react-grid-gallery"; import Lightbox from "yet-another-react-lightbox"; import Captions from "yet-another-react-lightbox/plugins/captions"; +import { CalendarArrowDown, CalendarArrowUp, Hourglass } from "lucide-react"; export default function PotentialAlbumsAssets() { const { startDate, selectedIds, assets, updateContext } = usePotentialAlbumContext(); @@ -64,6 +65,22 @@ export default function PotentialAlbumsAssets() { if (startDate) fetchAssets(); }, [startDate]); + if (loading) return ( +
+ +

Loading...

+
+ ) + + if (!startDate) return ( +
+ +

Please select a date

+

+ When you select a date from the left, you will see all the orphan assets captured on that date +

+
+ ) return ( <>