자동화 구축: Docker 이미지를 빌드, 푸시, 재시작하는 GitHub Actions 워크플로 추가 및 고도화된 매수 체결 로직 반영
Some checks failed
Build Push and Restart Compose / deploy (push) Failing after 12s
Some checks failed
Build Push and Restart Compose / deploy (push) Failing after 12s
This commit is contained in:
35
.gitea/workflows/workflows.yaml
Normal file
35
.gitea/workflows/workflows.yaml
Normal 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
|
||||
Reference in New Issue
Block a user