From 886221013970354737475ed51d18efa6b35c3d6c Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 1 Jun 2026 14:38:49 -0700 Subject: [PATCH] refac --- .github/workflows/docker.yaml | 24 ++++++++++++++++++- .../layout/Sidebar/ChannelModal.svelte | 6 ++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index bd46f65d54..3fd5a5f5bc 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -143,6 +143,7 @@ jobs: merge: runs-on: ubuntu-latest needs: [build] + if: !cancelled() permissions: contents: read packages: write @@ -168,16 +169,32 @@ jobs: echo "FULL_IMAGE_NAME=${REGISTRY}/${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV} - name: Download digests + id: download uses: actions/download-artifact@v5 with: pattern: digests-${{ matrix.variant.name }}-* path: /tmp/digests merge-multiple: true + continue-on-error: true + + - name: Check digests + id: check + run: | + count=$(find /tmp/digests -type f 2>/dev/null | wc -l | tr -d ' ') + echo "digest_count=$count" >> $GITHUB_OUTPUT + if [ "$count" -lt 2 ]; then + echo "::warning::${{ matrix.variant.name }}: found $count digest(s), need 2 (one per arch). Skipping merge." + echo "skip=true" >> $GITHUB_OUTPUT + else + echo "skip=false" >> $GITHUB_OUTPUT + fi - name: Set up Docker Buildx + if: steps.check.outputs.skip != 'true' uses: docker/setup-buildx-action@v3 - name: Log in to the Container registry + if: steps.check.outputs.skip != 'true' uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} @@ -185,6 +202,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata for Docker images + if: steps.check.outputs.skip != 'true' id: meta uses: docker/metadata-action@v5 with: @@ -201,6 +219,7 @@ jobs: ${{ matrix.variant.suffix != '' && format('suffix={0},onlatest=true', matrix.variant.suffix) || '' }} - name: Create manifest list and push + if: steps.check.outputs.skip != 'true' working-directory: /tmp/digests run: | docker buildx imagetools create \ @@ -208,12 +227,15 @@ jobs: $(printf '${{ env.FULL_IMAGE_NAME }}@sha256:%s ' *) - name: Inspect image + if: steps.check.outputs.skip != 'true' run: | docker buildx imagetools inspect ${{ env.FULL_IMAGE_NAME }}:${{ steps.meta.outputs.version }} copy-to-dockerhub: runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') + if: >- + !cancelled() && + (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) needs: [merge] continue-on-error: true strategy: diff --git a/src/lib/components/layout/Sidebar/ChannelModal.svelte b/src/lib/components/layout/Sidebar/ChannelModal.svelte index 465731ec7c..4da7896be7 100644 --- a/src/lib/components/layout/Sidebar/ChannelModal.svelte +++ b/src/lib/components/layout/Sidebar/ChannelModal.svelte @@ -215,9 +215,9 @@
{$i18n.t('Channel Name')} - {(type === 'dm' ? $i18n.t('Optional') : '')} + + {#if type === 'dm'}{$i18n.t('Optional')}{/if} +