-
Notifications
You must be signed in to change notification settings - Fork 8
45 lines (40 loc) · 1.23 KB
/
release-dev.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Release Docker Image (Development)
on:
push:
branches:
- development
paths:
- ".github/workflows/release-dev.yaml"
- "next/**/*"
jobs:
release-docker-image-development:
name: Release Docker Image (Development)
runs-on: ubuntu-latest
environment:
name: development
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 }}:development
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: development
- 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 }}