Skip to content

Commit

Permalink
👷 feat: add CI to build image and push it to Dockerhub (#5)
Browse files Browse the repository at this point in the history
* 👷 feat(CI): add CI in order to build and push image to the registry

* ⚗️ test: trigger the CI and add the PR branch

* 🔥 refactor: remove the current branch from the CI/CD triggerer branches
  • Loading branch information
mostafaghadimi committed Jan 30, 2024
1 parent 4c53a0c commit cae0c9f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: CI/CD pipeline for building Docker image

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v3
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker image
run: docker build -t mostafaghadimi/debezium_avro_integration:latest .
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push image to Docker Hub
run: docker push mostafaghadimi/debezium_avro_integration:latest

0 comments on commit cae0c9f

Please sign in to comment.