-
Notifications
You must be signed in to change notification settings - Fork 52
55 lines (47 loc) · 1.36 KB
/
docker-image.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
name: Docker Images
on:
push:
branches:
- main
tags:
- 'v*'
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Delete huge unnecessary tools folder
run: sudo rm -rf /opt/hostedtoolcache
- name: Remove unnecessary files
run: |
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
- name: Check out the repo
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push backend image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: etown/owl:latest
platforms: linux/amd64,linux/arm64
- name: Build and push web image
uses: docker/build-push-action@v2
with:
context: ./clients/web
file: ./clients/web/Dockerfile
push: true
tags: etown/owl-web:latest
platforms: linux/amd64,linux/arm64