Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsingh132 committed Oct 10, 2024
1 parent a8c9c8d commit e70b6cd
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Docker image
name: Build and Publish Docker Image

on:
push:
Expand All @@ -14,14 +14,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set current date as env variable
run: echo "NOW=$(date +'%Y-%m-%d_%H-%M-%S')" >> $GITHUB_ENV
- name: Echo current date
run: echo "$NOW"
- name: Build the Docker image
run: |
docker build . --build-arg NEXT_PUBLIC_CONVEX_URL=${{ vars.NEXT_PUBLIC_CONVEX_URL }} --build-arg NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=${{ vars.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }} --file Dockerfile --tag ${{ secrets.DOCKER_USERNAME }}/aionair:$NOW
docker build . --build-arg NEXT_PUBLIC_CONVEX_URL=${{ vars.NEXT_PUBLIC_CONVEX_URL }} --build-arg NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=${{ vars.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }} --file Dockerfile --tag ${{ secrets.DOCKER_USERNAME }}/aionair:latest
- name: Push the Docker image
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_TOKEN }}
docker push ${{ secrets.DOCKER_USERNAME }}/aionair:$NOW
docker push ${{ secrets.DOCKER_USERNAME }}/aionair:latest

0 comments on commit e70b6cd

Please sign in to comment.