t1
Some checks failed
Gitea Actions Demo / build-and-deploy (push) Failing after 3s

This commit is contained in:
changsongdong
2025-11-04 21:07:58 +08:00
parent c74ad94102
commit 5617024619
3 changed files with 52 additions and 2 deletions

View File

@ -15,5 +15,19 @@ jobs:
run: git clone ${{ gitea.server_url }}/${{ gitea.repository }} .
- name: List files
run: ls -la
- name: docker command
run: docker ps -a
- name: Stop running containers
run: |
docker compose down || true
- name: Remove old image
run: |
IMAGE_NAME=$(basename "$PWD")
echo "Removing old image: $IMAGE_NAME"
docker images | grep "$IMAGE_NAME" && docker rmi -f $(docker images "$IMAGE_NAME" -q) || echo "No old image found."
- name: Build new image
run: |
docker build -t $(basename "$PWD"):latest .
- name: Start containers
run: |
docker compose up -d
- name: Show container status
run: docker ps