create and push docker container

This commit is contained in:
Shihaam Abdul Rahman 2023-04-09 10:20:49 +05:00 committed by GitHub
parent 47801ff220
commit dcb6ac8142
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

23
.github/workflows/docker-image.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: Build and Push Docker Compose on Commit
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build Docker Compose
run: docker compose -f .build/docker-compose.yml build
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push Docker Compose
run: docker compose -f .build/docker-compose.yml push