-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (58 loc) · 2.11 KB
/
test-build.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Test Build Container Image
on:
workflow_dispatch:
pull_request:
permissions: write-all
jobs:
build-backend:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: ./backend
file: ./docker/production/backend/Dockerfile
platforms: linux/amd64
push: false
tags: ghcr.io/yaken-org/hakushi-backend:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
build-frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: ./frontend
file: ./docker/production/frontend/Dockerfile
platforms: linux/amd64
push: false
tags: ghcr.io/yaken-org/hakushi-frontend:latest
secrets: |
"auth_secret=${{ secrets.AUTH_SECRET }}"
"google_client_id=${{ secrets.GOOGLE_CLIENT_ID }}"
"google_client_secret=${{ secrets.GOOGLE_CLIENT_SECRET }}"
"backend_api_endpoint=${{ secrets.BACKEND_API_ENDPOINT }}"
"r2_access_key_id=${{ secrets.R2_ACCESS_KEY_ID }}"
"r2_secret_access_key=${{ secrets.R2_SECRET_ACCESS_KEY }}"
"r2_cloudflare_api_token=${{ secrets.R2_CLOUDFLARE_API_TOKEN }}"
"r2_api_endpoint=${{ secrets.R2_API_ENDPOINT }}"
"next_public_r2_static_url=${{ secrets.NEXT_PUBLIC_R2_STATIC_URL }}"
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}