Update docker-ghcr.yml

This commit is contained in:
NewName
2024-12-23 05:00:38 +08:00
parent 516fb01b13
commit a668dd7d05

View File

@@ -38,14 +38,16 @@ jobs:
- name: Set version from input
run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
- name: Navigate to ghproxy directory
run: cd ghproxy
- name: Build and push Docker image
run: |
docker buildx build --push \
--platform linux/amd64,linux/arm64 \
--tag ghcr.io/${{ github.repository }}:${{ env.VERSION }} \
--tag ghcr.io/${{ github.repository }}:latest \
--build-arg VERSION=${{ env.VERSION }} \
-f ghproxy/Dockerfile . # 指定 Dockerfile 的路径
--build-arg VERSION=${{ env.VERSION }} .
env:
GHCR_PUBLIC: true # 将镜像设置为公开