Skip to content

Merge pull request #71 from teacoder-team/dev #2

Merge pull request #71 from teacoder-team/dev

Merge pull request #71 from teacoder-team/dev #2

Workflow file for this run

name: Release
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
packages: write
id-token: write
jobs:
build-and-push:
name: Build and Push
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
build-args: |
NEXT_PUBLIC_APP_URL=${{ secrets.NEXT_PUBLIC_APP_URL }}
NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL }}
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/frontend:latest
${{ secrets.DOCKERHUB_USERNAME }}/frontend:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max