Skip to content

Commit

Permalink
Add CI/CD pipeline for Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
AryanSharma9917 committed Aug 15, 2024
1 parent 187697b commit 13d29c3
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI/CD Pipeline for Docker

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: aryansharma04/systemmonitoring:latest

- name: Clean up images
run: docker image prune -af

0 comments on commit 13d29c3

Please sign in to comment.