Initial commit: Modular personal toolbox with high-fidelity Chinese stroke order tool and CI/CD
Build and Push Docker Image / build (push) Failing after 32s
Build and Push Docker Image / build (push) Failing after 32s
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
name: Build and Push Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
# 设置 Docker 环境变量指向你 Pod 里的 dind 容器
|
||||
env:
|
||||
DOCKER_HOST: tcp://localhost:2375
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Log in to Gitea Registry
|
||||
run: echo "${{ secrets.PUSH_TOKEN }}" | docker login git.pengzhan.dev -u "${{ github.actor }}" --password-stdin
|
||||
|
||||
- name: Build and push Docker image
|
||||
run: |
|
||||
REPO_LOWER=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
|
||||
IMAGE_NAME="git.pengzhan.dev/$REPO_LOWER"
|
||||
docker build -t $IMAGE_NAME:latest -t $IMAGE_NAME:${{ github.sha }} .
|
||||
docker push $IMAGE_NAME:latest
|
||||
docker push $IMAGE_NAME:${{ github.sha }}
|
||||
Reference in New Issue
Block a user