mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
31 lines
723 B
YAML
31 lines
723 B
YAML
name: Deploy to Docker Hub
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, development, staging ]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
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 -b "$BRANCH_NAME" |