Skip to content

Commit eda5156

Browse files
committed
Add git_ref input to deployment workflow for branch selection
1 parent bf52ecc commit eda5156

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/deploy-labs.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
# Manual trigger with options
55
workflow_dispatch:
66
inputs:
7+
git_ref:
8+
description: 'Git Ref (branch or tag) to deploy'
9+
required: true
10+
default: 'main'
711
run_migrations:
812
description: 'Run database migrations before deployment'
913
type: boolean
@@ -37,6 +41,8 @@ jobs:
3741
steps:
3842
- name: Checkout code
3943
uses: actions/checkout@v4
44+
with:
45+
ref: ${{ github.event.inputs.git_ref }}
4046

4147
- name: Configure AWS credentials
4248
uses: aws-actions/configure-aws-credentials@v4
@@ -165,6 +171,7 @@ jobs:
165171
echo "🌐 Application URL: http://${{ steps.get-ip.outputs.public_ip }}:8000/"
166172
echo "🔐 Login URL: http://${{ steps.get-ip.outputs.public_ip }}:8000/accounts/login/"
167173
echo ""
174+
echo "📦 Deployed Ref: ${{ github.event.inputs.git_ref }}"
168175
echo "📊 ECS Cluster: ${{ env.ECS_CLUSTER }}"
169176
echo "🖥️ Web Service: ${{ env.ECS_WEB_SERVICE }}"
170177
echo "⚙️ Worker Service: ${{ env.ECS_WORKER_SERVICE }}"

0 commit comments

Comments
 (0)