Add building docker image to CI/CD pipeline

This commit is contained in:
Marius Begby committed 2023-08-20 19:21:41 +02:00
1 parent 1bfa8ede5a
commit c2a79688a5
1 file changed
+24
+24
View File
@@ -0,0 +1,24 @@
name: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push Docker Image
run: |
docker build -t mariusbegby/cadence:latest .
docker push mariusbegby/cadence:latest