-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (61 loc) · 2.19 KB
/
stg-deploy.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
name: Build App for Staging
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
id-token: write
packages: write
jobs:
stg-build-backend:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
environment: staging # 管理者の承認を必要とする
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/docker-build
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}
github-actor: ${{ github.actor }}
tags: ghcr.io/${{ github.repository }}-backend:stg-${{ github.sha }}-${{ github.run_number }}
path: "."
stg-build-backend-main:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/docker-build
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}
github-actor: ${{ github.actor }}
tags: ghcr.io/${{ github.repository }}-backend:stg-${{ github.sha }}-${{ github.run_number }}
path: "."
stg-build-frontend:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
environment: staging # 管理者の承認を必要とする
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/docker-build
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}
github-actor: ${{ github.actor }}
tags: ghcr.io/${{ github.repository }}-frontend:stg-${{ github.sha }}-${{ github.run_number }}
path: "./frontend"
build-args: |
- NEXT_PUBLIC_BACKEND_URL=http://stg-auth.default.svc.cluster.local:8080
stg-build-frontend-main:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/docker-build
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}
github-actor: ${{ github.actor }}
tags: ghcr.io/${{ github.repository }}-frontend:stg-${{ github.sha }}-${{ github.run_number }}
path: "./frontend"
build-args: |
- NEXT_PUBLIC_BACKEND_URL=http://stg-auth.default.svc.cluster.local:8080