Skip to content

chore: ajust logical getUpdateFormat frequency #72

chore: ajust logical getUpdateFormat frequency

chore: ajust logical getUpdateFormat frequency #72

name: Release Docker Image (Staging)
on:
push:
branches:
- staging
paths:
- ".github/workflows/release-staging.yaml"
- "next/**/*"
workflow_dispatch:
jobs:
release:
name: Release Docker Image (Staging)
runs-on: ubuntu-latest
environment:
name: staging
env:
NEXT_PUBLIC_API_URL: ${{ vars.NEXT_PUBLIC_API_URL }}
NEXT_PUBLIC_SITE_NAME: ${{ vars.NEXT_PUBLIC_SITE_NAME }}
NEXT_PUBLIC_KEY_STRIPE: ${{ secrets.NEXT_PUBLIC_KEY_STRIPE }}
NEXT_PUBLIC_BASE_URL_FRONTEND: ${{ vars.NEXT_PUBLIC_BASE_URL_FRONTEND }}
NODE_ENV: ${{ vars.NODE_ENV }}
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:staging
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: staging
- 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 }}
NEXT_PUBLIC_SITE_NAME=${{ env.NEXT_PUBLIC_SITE_NAME }}
NEXT_PUBLIC_KEY_STRIPE=${{ env.NEXT_PUBLIC_KEY_STRIPE }}
NEXT_PUBLIC_BASE_URL_FRONTEND=${{ env.NEXT_PUBLIC_BASE_URL_FRONTEND }}