Skip to content

Merge pull request #711 from basedosdados/staging #22

Merge pull request #711 from basedosdados/staging

Merge pull request #711 from basedosdados/staging #22

Workflow file for this run

name: Release Docker Image (Production)
on:
push:
branches:
- main
paths:
- ".github/workflows/release.yaml"
- "next/**/*"
jobs:
release-docker-image-production:
name: Release Docker Image (Production)
runs-on: ubuntu-latest
environment:
name: production
env:
NEXT_PORT: ${{ vars.NEXT_PORT }}
NEXT_PUBLIC_API_URL: ${{ vars.NEXT_PUBLIC_API_URL }}
NEXT_PUBLIC_SITE_NAME: ${{ vars.NEXT_PUBLIC_SITE_NAME }}
NODE_ENV: ${{ vars.NODE_ENV }}
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:production
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: main
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: next
file: next/Dockerfile
push: true
tags: ${{ env.IMAGE_NAME }}
build-args: |
NEXT_PUBLIC_API_URL=${{ env.NEXT_PUBLIC_API_URL }}