Skip to content

Push frontend image

Push frontend image #7

name: Push frontend image
on:
workflow_dispatch:
jobs:
push_image:
runs-on: ubuntu-latest
environment: staging
env:
NEXT_PUBLIC_STAGE: staging
NEXT_PUBLIC_BACKEND_URL: http://composite-api.ddns.net
NEXT_PUBLIC_URL: http://composite.ddns.net
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./front/Dockerfile.front
target: staging
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/composite-front:latest
build-args: |
NPM_TOKEN=${{ secrets.NPM_TOKEN }}