refac
This commit is contained in:
1 parent
5062f9958f
commit
8862210139
2 files changed
+26
-4
No files matched your search
@@ -143,6 +143,7 @@ jobs:
|
|||||||
merge:
|
merge:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build]
|
needs: [build]
|
||||||
|
if: !cancelled()
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
@@ -168,16 +169,32 @@ jobs:
|
|||||||
echo "FULL_IMAGE_NAME=${REGISTRY}/${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
|
echo "FULL_IMAGE_NAME=${REGISTRY}/${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
|
||||||
|
|
||||||
- name: Download digests
|
- name: Download digests
|
||||||
|
id: download
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v5
|
||||||
with:
|
with:
|
||||||
pattern: digests-${{ matrix.variant.name }}-*
|
pattern: digests-${{ matrix.variant.name }}-*
|
||||||
path: /tmp/digests
|
path: /tmp/digests
|
||||||
merge-multiple: true
|
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
|
- name: Set up Docker Buildx
|
||||||
|
if: steps.check.outputs.skip != 'true'
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Log in to the Container registry
|
- name: Log in to the Container registry
|
||||||
|
if: steps.check.outputs.skip != 'true'
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
@@ -185,6 +202,7 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Extract metadata for Docker images
|
- name: Extract metadata for Docker images
|
||||||
|
if: steps.check.outputs.skip != 'true'
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
@@ -201,6 +219,7 @@ jobs:
|
|||||||
${{ matrix.variant.suffix != '' && format('suffix={0},onlatest=true', matrix.variant.suffix) || '' }}
|
${{ matrix.variant.suffix != '' && format('suffix={0},onlatest=true', matrix.variant.suffix) || '' }}
|
||||||
|
|
||||||
- name: Create manifest list and push
|
- name: Create manifest list and push
|
||||||
|
if: steps.check.outputs.skip != 'true'
|
||||||
working-directory: /tmp/digests
|
working-directory: /tmp/digests
|
||||||
run: |
|
run: |
|
||||||
docker buildx imagetools create \
|
docker buildx imagetools create \
|
||||||
@@ -208,12 +227,15 @@ jobs:
|
|||||||
$(printf '${{ env.FULL_IMAGE_NAME }}@sha256:%s ' *)
|
$(printf '${{ env.FULL_IMAGE_NAME }}@sha256:%s ' *)
|
||||||
|
|
||||||
- name: Inspect image
|
- name: Inspect image
|
||||||
|
if: steps.check.outputs.skip != 'true'
|
||||||
run: |
|
run: |
|
||||||
docker buildx imagetools inspect ${{ env.FULL_IMAGE_NAME }}:${{ steps.meta.outputs.version }}
|
docker buildx imagetools inspect ${{ env.FULL_IMAGE_NAME }}:${{ steps.meta.outputs.version }}
|
||||||
|
|
||||||
copy-to-dockerhub:
|
copy-to-dockerhub:
|
||||||
runs-on: ubuntu-latest
|
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]
|
needs: [merge]
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
@@ -215,9 +215,9 @@
|
|||||||
<div class="flex flex-col w-full mt-2">
|
<div class="flex flex-col w-full mt-2">
|
||||||
<div class=" mb-1 text-xs text-gray-500">
|
<div class=" mb-1 text-xs text-gray-500">
|
||||||
{$i18n.t('Channel Name')}
|
{$i18n.t('Channel Name')}
|
||||||
<span class="text-xs text-gray-200 dark:text-gray-800 ml-0.5"
|
<span class="text-xs text-gray-200 dark:text-gray-800 ml-0.5">
|
||||||
>{(type === 'dm' ? $i18n.t('Optional') : '')}</span
|
{#if type === 'dm'}{$i18n.t('Optional')}{/if}
|
||||||
>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
|
|||||||
Reference in new issue
Block a user