-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (41 loc) · 1.22 KB
/
docker.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
name: Deploy
on:
workflow_run:
workflows: ["CI"]
branches: [main]
types:
- completed
jobs:
docker:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# https://github.com/docker/login-action#github-container-registry
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/docker/setup-buildx-action#usage
- uses: docker/setup-buildx-action@v2
# https://github.com/docker/build-push-action#usage
- uses: docker/build-push-action@v4
with:
push: true
context: .
tags: |
ghcr.io/${{ github.repository }}-django:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- uses: docker/build-push-action@v4
with:
push: true
context: frontend
tags: |
ghcr.io/${{ github.repository }}-vue:latest
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
VUE_APP_API_URL=/api/
VUE_APP_WEBSOCKET_URL=/api/ws