Skip to content

Commit cdba83d

Browse files
committed
code update: fix pipline
1 parent 4de528e commit cdba83d

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ jobs:
4141
with:
4242
python-version: "3.9"
4343

44+
# เพิ่ม step ติดตั้ง docker-compose
45+
- name: Install Docker Compose
46+
run: |
47+
sudo curl -L "https://github.com/docker/compose/releases/download/2.23.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
48+
sudo chmod +x /usr/local/bin/docker-compose
49+
4450
- name: Install dependencies
4551
run: |
4652
pip install -r requirements.txt
@@ -52,7 +58,7 @@ jobs:
5258

5359
# Stage 2: Build and Push
5460
build:
55-
needs: unit-test # รันต่อเมื่อ unit-test ผ่าน
61+
needs: unit-test
5662
runs-on: ubuntu-latest
5763
steps:
5864
- name: Checkout code
@@ -76,9 +82,9 @@ jobs:
7682

7783
# Stage 3: Deploy
7884
deploy:
79-
needs: build # รันต่อเมื่อ build ผ่าน
85+
needs: build
8086
runs-on: ubuntu-latest
81-
if: github.event_name == 'push' # Deploy เฉพาะ push ไม่ใช่ PR
87+
if: github.event_name == 'push'
8288
steps:
8389
- name: Checkout code
8490
uses: actions/checkout@v3

0 commit comments

Comments
 (0)