-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.41 KB
/
latest.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
52
53
54
55
56
name: latest
on:
push:
paths-ignore:
- '*.md'
- LICENSE
- nginx/
- postgres/
workflow_dispatch:
env:
BACKEND_DOCKER_BASE_NAME: ghcr.io/iamtakagi/twichat_backend
WEB_DOCKER_BASE_NAME: ghcr.io/iamtakagi/twichat_web
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- name: Build & Push (twichat_backend)
uses: docker/build-push-action@v2
env:
DOCKER_BUILDKIT: 1
with:
context: backend
push: ${{ github.ref == 'refs/heads/master' }}
tags: ${{ env.BACKEND_DOCKER_BASE_NAME }}:latest
cache-from: ${{ env.BACKEND_DOCKER_BASE_NAME }}:latest
build-args: BUILDKIT_INLINE_CACHE=1
- name: Build & Push (twichat_web)
uses: docker/build-push-action@v2
env:
DOCKER_BUILDKIT: 1
with:
context: web
push: ${{ github.ref == 'refs/heads/master' }}
tags: ${{ env.WEB_DOCKER_BASE_NAME }}:latest
cache-from: ${{ env.WEB_DOCKER_BASE_NAME }}:latest
build-args: BUILDKIT_INLINE_CACHE=1