Update docker-publish.yml

This commit is contained in:
ForgQi committed 2025-07-22 22:24:09 +08:00
1 parent 2c923cc8da
commit f4b75bf698
1 file changed
+43 -43
+43 -43
View File
@@ -48,46 +48,46 @@ jobs:
--build-arg branch_name=$BRANCH_NAME \
. --file Dockerfile
fi
#
#
# # Push image to GitHub Packages.
# # See also https://docs.docker.com/docker-hub/builds/
# push:
# # Ensure test job passes before pushing image.
# needs: test
#
# runs-on: ubuntu-latest
# if: github.event_name == 'push'
#
# steps:
# - name: Checkout
# uses: actions/checkout@v3
#
# - name: Docker meta
# id: meta
# uses: docker/metadata-action@v4
# with:
# # list of Docker images to use as base name for tags
# images: |
# ghcr.io/biliup/caution
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
#
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
#
# - name: Login to DockerHub
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Build and push
# uses: docker/build-push-action@v3
# with:
# context: .
# platforms: linux/amd64,linux/arm64
# push: true
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
push:
# Ensure test job passes before pushing image.
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/biliup/caution
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}