Skip to content

Fix build and workflows issues #3

Fix build and workflows issues

Fix build and workflows issues #3

Workflow file for this run

name: Docker Push
on:
push:
branches:
- main
pull_request:
branches:
- main
# workflow_run:
# workflows: ['Build and Test']
# types:
# - completed
jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Log into Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and push Docker image
run: |
SHA=${{ github.sha }}
docker build -t devhatt/octopost-backend:$SHA .
docker push devhatt/octopost-backend:$SHA
docker tag devhatt/octopost-backend:$SHA devhatt/octopost-backend:latest
docker push devhatt/octopost-backend:latest