-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.41 KB
/
docker-release.yml
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
46
47
48
49
50
51
name: Release to GitHub Container Registry
on:
release:
types:
- published
jobs:
build-and-push:
name: Build and Publish Docker Images
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Build and push backend image
uses: docker/build-push-action@v4
with:
context: ./backend
push: true
no-cache: true
tags: |
ghcr.io/mrspacecarrot/gamerater-backend:latest
ghcr.io/mrspacecarrot/gamerater-backend:${{ github.event.release.tag_name }}
- name: Build and push frontend image
uses: docker/build-push-action@v4
with:
context: ./frontend/gamerater
push: true
tags: |
ghcr.io/mrspacecarrot/gamerater-frontend:latest
ghcr.io/mrspacecarrot/gamerater-frontend:${{ github.event.release.tag_name }}
build-args: |
VITE_API_URL=${{ secrets.FRONTEND_VITE_API_URL }}
VITE_DISCORD_CLIENT_ID=${{ secrets.FRONTEND_VITE_DISCORD_CLIENT_ID }}
VITE_FINAL_REDIRECT_URI=${{ secrets.FRONTEND_VITE_FINAL_REDIRECT_URI }}