Skip to content

Commit

Permalink
Create docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rishi-s8 authored Nov 8, 2024
1 parent 3434d0c commit 1f39269
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and Push Docker Image

on:
push:
tags:
- '*' # Trigger on any tag push

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

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

- name: Make docker-build.sh executable
run: chmod +x docker-build.sh

- name: Build Docker image using docker-build.sh
run: ./docker-build.sh

- name: Tag Docker image
run: docker tag shatter-artifact-pets2025 rishis8/shatter-artifact-pets2025:${{ github.ref_name }}

- name: Push Docker image
run: docker push rishis8/shatter-artifact-pets2025:${{ github.ref_name }}

0 comments on commit 1f39269

Please sign in to comment.