Files
GoEdgeAdmin/.gitea/workflows/build.yaml
ChenKaiLiuG 80e0e69bef
Some checks failed
Build and Push Docker Image / build (push) Failing after 2s
Try workflow
2026-01-04 16:20:42 +08:00

22 lines
823 B
YAML

name: Build and Push Docker Image
on: [push] # 只要有代碼更新或上傳檔案,自動觸發
jobs:
build:
runs-on: ubuntu-latest # 對應你的 Runner
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Build and Push
run: |
# 登入內建 Registry (變數會自動填入)
docker login 192.168.10.100:3000 -u ${{ gitea.actor }} -p ${{ secrets.GITHUB_TOKEN }}
# 編譯 (映像檔名稱: 192.168.10.100:3000/使用者/倉庫名:latest)
IMAGE_NAME="192.168.10.100:3000/${{ gitea.repository }}:latest"
docker build -t $IMAGE_NAME .
docker push $IMAGE_NAME
echo "編譯完成!"
echo "外部 Portainer 拉取網址: 192.168.10.100:3000/${{ gitea.repository }}:latest"