Skip to content

Commit

Permalink
Update build-and-push.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
realcommang committed Nov 19, 2023
1 parent 8546dba commit 9028d65
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build and Push Docker Image

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-20.04

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

- name: Set up Docker
uses: actions/setup-docker@v2

- name: Build Docker image
run: docker build -t your-docker-hub-username/your-image-name:latest .

- name: Log in to Docker Hub
run: docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Push Docker image
run: docker push your-docker-hub-username/your-image-name:latest

0 comments on commit 9028d65

Please sign in to comment.