ci: publish to ghcr.io

This commit is contained in:
Soulter
2025-06-05 11:19:16 +08:00
committed by GitHub
parent 172a77d942
commit ceaba21986
+3 -10
View File
@@ -27,13 +27,6 @@ jobs:
if: github.event_name == 'workflow_dispatch'
run: git checkout ${{ steps.get-latest-tag.outputs.latest_tag }}
- name: Prepare lowercase metadata
id: meta
run: |
TAG="${{ github.event_name == 'workflow_dispatch' && steps.get-latest-tag.outputs.latest_tag || github.ref_name }}"
echo "tag_lc=${TAG,,}" >> $GITHUB_OUTPUT
echo "owner_lc=${{ github.repository_owner,, }}" >> $GITHUB_OUTPUT
- name: Set QEMU
uses: docker/setup-qemu-action@v3
@@ -61,9 +54,9 @@ jobs:
push: true
tags: |
${{ secrets.DOCKER_HUB_USERNAME }}/astrbot:latest
${{ secrets.DOCKER_HUB_USERNAME }}/astrbot:${{ steps.meta.outputs.tag_lc }}
ghcr.io/${{ steps.meta.outputs.owner_lc }}/astrbot:latest
ghcr.io/${{ steps.meta.outputs.owner_lc }}/astrbot:${{ steps.meta.outputs.tag_lc }}
${{ secrets.DOCKER_HUB_USERNAME }}/astrbot:${{ github.event_name == 'workflow_dispatch' && steps.get-latest-tag.outputs.latest_tag || github.ref_name }}
ghcr.io/soulter/astrbot:latest
ghcr.io/soulter/astrbot:${{ github.event_name == 'workflow_dispatch' && steps.get-latest-tag.outputs.latest_tag || github.ref_name }}
- name: Post build notifications
run: echo "Docker image has been built and pushed successfully"