-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (65 loc) · 1.95 KB
/
docker_check.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
name: Docker Build
on:
pull_request:
branches:
- main
jobs:
build-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Clean space as per https://github.com/actions/virtual-environments/issues/709
run: |
docker images
sudo rm -rf "/opt/ghc" || true
sudo rm -rf "/usr/share/dotnet" || true
sudo rm -rf "$AGENT_TOOLSDIRECTORY" || true
sudo rm -rf "/usr/local/lib/android" || true
sudo rm -rf "/usr/local/share/boost" || true
docker rmi $(docker image ls -q --filter "reference=node*")
docker rmi $(docker image ls -q --filter "reference=debian*")
docker rmi $(docker image ls -q --filter "reference=alpine*")
docker rmi $(docker image ls -q --filter "reference=ubuntu:20.04")
- name: apt-get remove cleanup
run: |
sudo apt purge -y \
ansible* \
aria2* \
aspnetcore* \
azure-cli* \
cabal* \
clang* \
dotnet-* \
firefox* \
gfortran-* \
ghc* \
google-chrome-stable* \
google-cloud-sdk* \
heroku* \
imagemagick* \
javascript* \
kubectl* \
llvm* \
mono* \
mysql* \
nginx* \
node* \
npm* \
nuget* \
php* \
postgresql* \
powershell* \
rpm* \
ruby* \
sqlite3* \
subversion \
temurin* \
tmux* \
vim* \
yarn*
sudo apt-get autoremove -y >/dev/null 2>&1 || true
sudo apt-get autoclean -y >/dev/null 2>&1 || true
- name: Build Docker image
run: |
cd docker && docker build . -f ./Dockerfile.x86 -t ghcr.io/${{ github.repository }}:latest