-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (41 loc) · 1.19 KB
/
docker-build.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
name: Docker Build
on:
workflow_dispatch: {}
release:
types:
- published
permissions:
actions: write
packages: write
jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- name: Free disk space
run: |
sudo swapoff -a
sudo rm -f /swapfile
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell mono-devel
sudo apt-get autoremove -y
sudo apt-get clean
docker rmi $(docker image ls -aq)
rm -rf /usr/share/dotnet/
df -h
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker build
run: bash scripts/docker/build.sh mlflow
- name: Login to GitHub Package Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Docker push
run: bash scripts/docker/push.sh mlflow