File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Build and Push Docker Image to GitHub Container Registry
2-
1+ name : Build and Push
32on :
43 push :
54 branches :
65 - main
7-
6+ permissions :
7+ packages : write
8+ id-token : write
89jobs :
910 build :
10- runs-on : ubuntu-latest
11- permissions :
12- contents : read
13- packages : write
14- id-token : write
15-
11+ runs-on : ubuntu-latest
1612 steps :
17- # 检出代码
1813 - name : Checkout code
1914 uses : actions/checkout@v3
20-
21- # 设置 Docker Buildx
2215 - name : Set up Docker Buildx
2316 uses : docker/setup-buildx-action@v2
24-
25- # 登录到 GitHub Container Registry
2617 - name : Login to GitHub Container Registry
2718 uses : docker/login-action@v2
2819 with :
2920 registry : ghcr.io
30- username : ${{ github.actor }} # GitHub 用户名
31- password : ${{ secrets.GITHUB_TOKEN }} # GitHub 自动生成的令牌
32-
33- # 构建并推送 Docker 镜像
21+ username : ${{ github.actor }}
22+ password : ${{ secrets.GITHUB_TOKEN }}
3423 - name : Build and push Docker image to GitHub Container Registry
3524 uses : docker/build-push-action@v3
3625 with :
37- context : . # 当前目录作为构建上下文
38- file : ./Dockerfile # Dockerfile 路径
39- push : true # 推送镜像
40- tags : ghcr.io/inknight-dednet/comfy_container_ui:latest # 镜像推送到 GitHub 包注册表
26+ context : .
27+ file : ./Dockerfile
28+ push : true
29+ tags : ghcr.io/inknight-dednet/comfy_container_ui:latest
You can’t perform that action at this time.
0 commit comments