Skip to content

Update workflow

Update workflow #16

Workflow file for this run

name: Publish Docker image
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set current date as env variable
run: echo "NOW=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV
- name: Echo current date
run: echo "$NOW - env:${{ env.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
- name: Push the Docker image
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_TOKEN }}
docker push ${{ secrets.DOCKER_USERNAME }}/aionair:$NOW