CD: build/deploy จาก branch dev แทน main
All checks were successful
Deploy eCourt Note Web to Server / Validate Database Schema (Drizzle) (push) Successful in 3s
Deploy eCourt Note Web to Server / Build Web Docker Image (push) Successful in 44s
Deploy eCourt Note Web to Server / Deploy eCourt Note Web to Server (push) Successful in 4s
Deploy eCourt Note Web to Server / Notify Deployment Status (push) Successful in 1s
All checks were successful
Deploy eCourt Note Web to Server / Validate Database Schema (Drizzle) (push) Successful in 3s
Deploy eCourt Note Web to Server / Build Web Docker Image (push) Successful in 44s
Deploy eCourt Note Web to Server / Deploy eCourt Note Web to Server (push) Successful in 4s
Deploy eCourt Note Web to Server / Notify Deployment Status (push) Successful in 1s
เปลี่ยนการตรวจ tag ให้อยู่บน origin/dev + diff เช็ค schema เทียบ origin/dev Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
parent
83108dd16c
commit
f6f4ed9129
1 changed files with 10 additions and 10 deletions
|
|
@ -35,24 +35,24 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Verify tag is on main branch
|
- name: Verify tag is on dev branch
|
||||||
run: |
|
run: |
|
||||||
echo "======================================================"
|
echo "======================================================"
|
||||||
echo "Verifying tag is pushed to main branch"
|
echo "Verifying tag is pushed to dev branch"
|
||||||
echo "======================================================"
|
echo "======================================================"
|
||||||
echo "Tag: ${{ github.ref_name }}"
|
echo "Tag: ${{ github.ref_name }}"
|
||||||
echo "Commit: ${{ github.sha }}"
|
echo "Commit: ${{ github.sha }}"
|
||||||
|
|
||||||
# Fetch main branch
|
# Fetch dev branch
|
||||||
git fetch origin main
|
git fetch origin dev
|
||||||
|
|
||||||
# Check if the tag's commit is on main branch
|
# Check if the tag's commit is on dev branch
|
||||||
if git branch -r --contains ${{ github.sha }} | grep -q "origin/main"; then
|
if git branch -r --contains ${{ github.sha }} | grep -q "origin/dev"; then
|
||||||
echo "✅ Tag is on main branch"
|
echo "✅ Tag is on dev branch"
|
||||||
echo "test_branch=true" >> $GITHUB_ENV
|
echo "test_branch=true" >> $GITHUB_ENV
|
||||||
else
|
else
|
||||||
echo "❌ Tag is NOT on main branch"
|
echo "❌ Tag is NOT on dev branch"
|
||||||
echo "This workflow only triggers for tags pushed to main branch"
|
echo "This workflow only triggers for tags pushed to dev branch"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Current branches containing this commit:"
|
echo "Current branches containing this commit:"
|
||||||
git branch -r --contains ${{ github.sha }}
|
git branch -r --contains ${{ github.sha }}
|
||||||
|
|
@ -63,7 +63,7 @@ jobs:
|
||||||
id: schema-check
|
id: schema-check
|
||||||
run: |
|
run: |
|
||||||
# โปรเจกต์นี้ใช้ Drizzle (drizzle-kit push) ไม่มีโฟลเดอร์ migrations — ดูการเปลี่ยนแปลงที่ db/schema.ts
|
# โปรเจกต์นี้ใช้ Drizzle (drizzle-kit push) ไม่มีโฟลเดอร์ migrations — ดูการเปลี่ยนแปลงที่ db/schema.ts
|
||||||
if git diff --name-only origin/main...HEAD | grep -qE "^db/schema\.ts$"; then
|
if git diff --name-only origin/dev...HEAD | grep -qE "^db/schema\.ts$"; then
|
||||||
echo "has_schema_changes=true" >> $GITHUB_OUTPUT
|
echo "has_schema_changes=true" >> $GITHUB_OUTPUT
|
||||||
echo "✅ Schema changes detected"
|
echo "✅ Schema changes detected"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue