-
Notifications
You must be signed in to change notification settings - Fork 30
58 lines (49 loc) · 1.47 KB
/
build-nightly-docker-image.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
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Build and Publish Sparsify Release Docker Images
on:
push:
branches:
- 'main'
jobs:
build-and-push-docker-image:
name: Build and Push Version Tagged Docker Images to GitHub Container Registry
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Cleanup disk
run: |
sudo ls -l /usr/local/lib/
sudo ls -l /usr/share/
sudo du -sh /usr/local/lib/
sudo du -sh /usr/share/
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
sudo du -sh /usr/local/lib/
sudo du -sh /usr/share/
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: --debug
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Login to Github Packages
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push sparsify-nightly docker image
uses: docker/build-push-action@v2
with:
context: ./docker
build-args: |
REF=main
push: true
tags: |
ghcr.io/neuralmagic/sparsify-nightly:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}