-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (80 loc) · 2.66 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Publish
on:
push:
branches:
- develop
tags:
- v*
env:
REGISTRY: ghcr.io
BSK_VERSION: "v2.2.1"
jobs:
publish:
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout Basilisk
uses: actions/checkout@v4
with:
repository: AVSLab/basilisk
ref: ${{ env.BSK_VERSION }}
lfs: true
path: basilisk
- name: Check disk space
run: |
sudo dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -nr | head
df . -h
sudo du /usr/ -hx -d 4 --threshold=1G | sort -hr | head
- name: Free disk space
run: |
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
echo "some directories deleted"
- name: Check disk space
run: |
sudo dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -nr | head
df . -h
sudo du /usr/ -hx -d 4 --threshold=1G | sort -hr | head
- name: Login to the Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Build, scan, and push basilisk-jupyterlabs Docker artifacts.
- name: Extract metadata (tags, labels) for basilisk-jupyterlabs Docker image
id: metadata
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/lasp/basilisk-jupyterlabs
tags: type=raw, value=${{ env.BSK_VERSION }}
- name: Build basilisk-jupyterlabs Docker image
uses: docker/build-push-action@v5
with:
context: .
file: basilisk-jupyterlabs.Containerfile
load: true
tags: ${{ env.REGISTRY }}/lasp/basilisk-jupyterlabs:${{ github.sha }}
- name: Push basilisk-jupyterlabs Docker image
uses: docker/build-push-action@v5
with:
context: .
file: basilisk-jupyterlabs.Containerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}