Skip to content

Commit 8862210

Browse files
committed
refac
1 parent 5062f99 commit 8862210

2 files changed

Lines changed: 26 additions & 4 deletions

File tree

.github/workflows/docker.yaml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ jobs:
143143
merge:
144144
runs-on: ubuntu-latest
145145
needs: [build]
146+
if: !cancelled()
146147
permissions:
147148
contents: read
148149
packages: write
@@ -168,23 +169,40 @@ jobs:
168169
echo "FULL_IMAGE_NAME=${REGISTRY}/${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
169170
170171
- name: Download digests
172+
id: download
171173
uses: actions/download-artifact@v5
172174
with:
173175
pattern: digests-${{ matrix.variant.name }}-*
174176
path: /tmp/digests
175177
merge-multiple: true
178+
continue-on-error: true
179+
180+
- name: Check digests
181+
id: check
182+
run: |
183+
count=$(find /tmp/digests -type f 2>/dev/null | wc -l | tr -d ' ')
184+
echo "digest_count=$count" >> $GITHUB_OUTPUT
185+
if [ "$count" -lt 2 ]; then
186+
echo "::warning::${{ matrix.variant.name }}: found $count digest(s), need 2 (one per arch). Skipping merge."
187+
echo "skip=true" >> $GITHUB_OUTPUT
188+
else
189+
echo "skip=false" >> $GITHUB_OUTPUT
190+
fi
176191
177192
- name: Set up Docker Buildx
193+
if: steps.check.outputs.skip != 'true'
178194
uses: docker/setup-buildx-action@v3
179195

180196
- name: Log in to the Container registry
197+
if: steps.check.outputs.skip != 'true'
181198
uses: docker/login-action@v3
182199
with:
183200
registry: ${{ env.REGISTRY }}
184201
username: ${{ github.actor }}
185202
password: ${{ secrets.GITHUB_TOKEN }}
186203

187204
- name: Extract metadata for Docker images
205+
if: steps.check.outputs.skip != 'true'
188206
id: meta
189207
uses: docker/metadata-action@v5
190208
with:
@@ -201,19 +219,23 @@ jobs:
201219
${{ matrix.variant.suffix != '' && format('suffix={0},onlatest=true', matrix.variant.suffix) || '' }}
202220
203221
- name: Create manifest list and push
222+
if: steps.check.outputs.skip != 'true'
204223
working-directory: /tmp/digests
205224
run: |
206225
docker buildx imagetools create \
207226
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
208227
$(printf '${{ env.FULL_IMAGE_NAME }}@sha256:%s ' *)
209228
210229
- name: Inspect image
230+
if: steps.check.outputs.skip != 'true'
211231
run: |
212232
docker buildx imagetools inspect ${{ env.FULL_IMAGE_NAME }}:${{ steps.meta.outputs.version }}
213233
214234
copy-to-dockerhub:
215235
runs-on: ubuntu-latest
216-
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
236+
if: >-
237+
!cancelled() &&
238+
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
217239
needs: [merge]
218240
continue-on-error: true
219241
strategy:

src/lib/components/layout/Sidebar/ChannelModal.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@
215215
<div class="flex flex-col w-full mt-2">
216216
<div class=" mb-1 text-xs text-gray-500">
217217
{$i18n.t('Channel Name')}
218-
<span class="text-xs text-gray-200 dark:text-gray-800 ml-0.5"
219-
>{(type === 'dm' ? $i18n.t('Optional') : '')}</span
220-
>
218+
<span class="text-xs text-gray-200 dark:text-gray-800 ml-0.5">
219+
{#if type === 'dm'}{$i18n.t('Optional')}{/if}
220+
</span>
221221
</div>
222222

223223
<div class="flex-1">

0 commit comments

Comments
 (0)