Implement branch-specific docker tags in build script and CI workflow

Co-authored-by: alexmickelson <43245625+alexmickelson@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-09-29 18:01:33 +00:00
parent c29c7c0853
commit 2a350f5629
2 changed files with 101 additions and 24 deletions

View File

@@ -2,7 +2,7 @@ name: Deploy to Docker Hub
on:
push:
branches: [ main ]
branches: [ main, development, staging ]
jobs:
deploy:
@@ -21,7 +21,11 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract branch name
shell: bash
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Build and push Docker image
run: |
chmod +x ./build.sh
./build.sh -t -p
./build.sh -t -p -b "$BRANCH_NAME"