Skip to content

Merge pull request #5 from fossyy/dependabot/go_modules/gorm.io/gorm-… #5

Merge pull request #5 from fossyy/dependabot/go_modules/gorm.io/gorm-…

Merge pull request #5 from fossyy/dependabot/go_modules/gorm.io/gorm-… #5

Workflow file for this run

name: Docker Build and Push
on:
push:
branches:
- main
- staging
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/cutit:${{ github.ref_name }}
${{ secrets.DOCKERHUB_USERNAME }}/cutit:latest
if: github.ref == 'refs/heads/main'
- name: Build and push Docker image for staging
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/cutit:staging
if: github.ref == 'refs/heads/staging'