Skip to content

Commit

Permalink
Create docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsingh132 authored Oct 13, 2024
1 parent faae840 commit 5c33c18
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Docker Image CI

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

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: |
docker build . --build-arg NEXT_PUBLIC_BACKEND_URL=${{ vars.NEXT_PUBLIC_BACKEND_URL }} --build-arg NEXT_PUBLIC_FRONTEND_URL=${{ vars.NEXT_PUBLIC_FRONTEND_URL }} --build-arg NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=${{ vars.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME }} --build-arg NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET=${{ vars.NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET }} --file Dockerfile --tag ${{ secrets.DOCKER_USERNAME }}/artsphere:latest
- name: Push the Docker image
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_TOKEN }}
docker push ${{ secrets.DOCKER_USERNAME }}/artsphere:latest

0 comments on commit 5c33c18

Please sign in to comment.