자동화 구축: Docker 이미지를 빌드, 푸시, 재시작하는 GitHub Actions 워크플로 추가 및 고도화된 매수 체결 로직 반영
Some checks failed
Build Push and Restart Compose / deploy (push) Failing after 12s

This commit is contained in:
hayato5246
2026-04-01 20:50:16 +09:00
parent d10b794c9f
commit 2aa433013b
4 changed files with 115 additions and 50 deletions

View File

@@ -0,0 +1,35 @@
name: Build Push and Restart Compose
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
env:
IMAGE_NAME: lshfly-registry.duckdns.org/stocksearch:latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to registry
run: |
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login lshfly-registry.duckdns.org -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
- name: Build image
run: |
docker build -t ${IMAGE_NAME} .
- name: Push image
run: |
docker push ${IMAGE_NAME}
- name: Restart compose
run: |
cd /workspace/${{ gitea.repository }}
docker compose pull
docker compose up -d