diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 2baf6e9ae5..20da0c5201 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -177,13 +177,9 @@ jobs: runs-on: ubuntu-latest if: always() steps: - - name: Any jobs failed? - if: ${{ contains(needs.*.result, 'failure') }} - run: exit 1 - - name: All jobs passed or skipped - if: ${{ !(contains(needs.*.result, 'failure')) }} - # zizmor: ignore[template-injection] - run: echo "All jobs passed or skipped" && echo "${{ toJSON(needs.*.result) }}" + - uses: immich-app/devtools/actions/success-check@6b81b1572e466f7f48ba3c823159ce3f4a4d66a6 # success-check-action-0.0.3 + with: + needs: ${{ toJSON(needs) }} success-check-ml: name: Docker Build & Push ML Success @@ -192,10 +188,6 @@ jobs: runs-on: ubuntu-latest if: always() steps: - - name: Any jobs failed? - if: ${{ contains(needs.*.result, 'failure') }} - run: exit 1 - - name: All jobs passed or skipped - if: ${{ !(contains(needs.*.result, 'failure')) }} - # zizmor: ignore[template-injection] - run: echo "All jobs passed or skipped" && echo "${{ toJSON(needs.*.result) }}" + - uses: immich-app/devtools/actions/success-check@6b81b1572e466f7f48ba3c823159ce3f4a4d66a6 # success-check-action-0.0.3 + with: + needs: ${{ toJSON(needs) }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a0e8f51b06..186eb07761 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -479,13 +479,9 @@ jobs: runs-on: ubuntu-latest if: always() steps: - - name: Any jobs failed? - if: ${{ contains(needs.*.result, 'failure') }} - run: exit 1 - - name: All jobs passed or skipped - if: ${{ !(contains(needs.*.result, 'failure')) }} - # zizmor: ignore[template-injection] - run: echo "All jobs passed or skipped" && echo "${{ toJSON(needs.*.result) }}" + - uses: immich-app/devtools/actions/success-check@6b81b1572e466f7f48ba3c823159ce3f4a4d66a6 # success-check-action-0.0.3 + with: + needs: ${{ toJSON(needs) }} mobile-unit-tests: name: Unit Test Mobile diff --git a/.github/workflows/weblate-lock.yml b/.github/workflows/weblate-lock.yml index b762ac636c..0758ef4dc9 100644 --- a/.github/workflows/weblate-lock.yml +++ b/.github/workflows/weblate-lock.yml @@ -52,10 +52,6 @@ jobs: permissions: {} if: always() steps: - - name: Any jobs failed? - if: ${{ contains(needs.*.result, 'failure') }} - run: exit 1 - - name: All jobs passed or skipped - if: ${{ !(contains(needs.*.result, 'failure')) }} - # zizmor: ignore[template-injection] - run: echo "All jobs passed or skipped" && echo "${{ toJSON(needs.*.result) }}" + - uses: immich-app/devtools/actions/success-check@6b81b1572e466f7f48ba3c823159ce3f4a4d66a6 # success-check-action-0.0.3 + with: + needs: ${{ toJSON(needs) }} diff --git a/server/src/utils/database.ts b/server/src/utils/database.ts index 8ecf9c115e..d7417becf1 100644 --- a/server/src/utils/database.ts +++ b/server/src/utils/database.ts @@ -235,6 +235,8 @@ export function inAlbums(qb: SelectQueryBuilder, albumIds: s .selectFrom('albums_assets_assets') .select('assetsId') .where('albumsId', '=', anyUuid(albumIds!)) + .groupBy('assetsId') + .having((eb) => eb.fn.count('albumsId').distinct(), '=', albumIds.length) .as('has_album'), (join) => join.onRef('has_album.assetsId', '=', 'assets.id'), );