feat: 添加GitHub Actions工作流构建Docker镜像
- 添加一个新的GitHub Actions工作流以构建和推送Docker镜像。
This commit is contained in:
26
docker/example.yaml
Normal file
26
docker/example.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
DOCKER_REGISTRY: git.furtherverse.com
|
||||||
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-image:
|
||||||
|
runs-on: ubuntu-latest-amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- <<: *docker-setup-buildx
|
||||||
|
|
||||||
|
- <<: *docker-login
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: docker/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest-${{ env.ARCH }}
|
||||||
Reference in New Issue
Block a user