mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
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:
8
.github/workflows/docker-deploy.yml
vendored
8
.github/workflows/docker-deploy.yml
vendored
@@ -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"
|
||||
Reference in New Issue
Block a user