Skip to content

upload to docker hub #54

upload to docker hub

upload to docker hub #54

name: Docker Compose Build and Publish
on:
push:
branches:
- master
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build the Docker image
run: docker-compose -f docker-compose.yml build
- name: Log into Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push the Docker image to Docker Hub
run: docker-compose -f docker-compose.yml push