-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (31 loc) · 1.15 KB
/
build-publish.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
name: Build and publish to GHCR
on:
push:
branches: [ "main" ]
jobs:
build-backend:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build container
run: docker build -t ghcr.io/jerbob/clipchimp:${GITHUB_SHA} -t ghcr.io/jerbob/clipchimp:latest backend
- name: Login to GHCR
run: echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u jerbob --password-stdin
- name: Push to GHCR
run: |
docker push ghcr.io/jerbob/clipchimp:${GITHUB_SHA}
docker push ghcr.io/jerbob/clipchimp:latest
build-frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build container
run: docker build -t ghcr.io/jerbob/clipchimp-frontend:${GITHUB_SHA} -t ghcr.io/jerbob/clipchimp-frontend:latest frontend
- name: Login to GHCR
run: echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u jerbob --password-stdin
- name: Push to GHCR
run: |
docker push ghcr.io/jerbob/clipchimp-frontend:${GITHUB_SHA}
docker push ghcr.io/jerbob/clipchimp-frontend:latest