Skip to content

Commit

Permalink
Create docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
joesajigeorge authored Jun 19, 2024
1 parent 713ccdf commit 50487c7
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: NodeJS Docker Demo

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
IMAGE_NAME: sajigeorgejoe/my_node_app
IMAGE_TAG: github

jobs:
build_image:

steps:
- name: Check out the repo
uses: actions/checkout@v4

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

- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6.0.1
with:
context: .
file: ./Dockerfile
push: true
tags: $IMAGE_NAME:$IMAGE_TAG

0 comments on commit 50487c7

Please sign in to comment.