Skip to content

adds workflow for publishing docker image #2

adds workflow for publishing docker image

adds workflow for publishing docker image #2

Workflow file for this run

name: Publish image to Docker Hub
on:
push:
branches:
- deploy-docker
# workflow_run:
# workflows: [build]
# types:
# - completed
jobs:
publish-image:
#if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push Docker Image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/sdt-v2:latest -f ./docker/Dockerfile .
docker push ${{ secrets.DOCKER_USERNAME }}/sdt-v2:latest