-
Notifications
You must be signed in to change notification settings - Fork 6
109 lines (94 loc) · 4.23 KB
/
build.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Github CI build
on:
push:
tags:
- '*'
pull_request:
branches:
- master
env:
RELEASE: 3.4.0.24
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: System info
run: |
df -i
df -h
docker info
- name: Clear up some space on runner
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Prepare
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
run: echo "RELEASE=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Build tarballs
run: docker run --rm --privileged
-e RELEASE=$RELEASE
-v $PWD:/share -w /share
coderus/sailfishos-baseimage
bash build-all.sh
- name: Setup base
run: |
set -x
docker import build/platformsdk-i486.tar coderus/sailfishos-platform-sdk-base:latest
docker tag coderus/sailfishos-platform-sdk-base:latest coderus/sailfishos-platform-sdk-base:$RELEASE
sudo rm -rf build/platformsdk-i486.tar
docker push coderus/sailfishos-platform-sdk-base:latest
docker push coderus/sailfishos-platform-sdk-base:$RELEASE
- name: Setup tooling
run: |
set -x
docker build --build-arg RELEASE=$RELEASE -t coderus/sailfishos-platform-sdk-base-tooling:latest -f Dockerfile.tooling .
docker tag coderus/sailfishos-platform-sdk-base-tooling:latest coderus/sailfishos-platform-sdk-base-tooling:$RELEASE
docker push coderus/sailfishos-platform-sdk-base-tooling:latest
docker push coderus/sailfishos-platform-sdk-base-tooling:$RELEASE
- name: Setup release
run: |
set -x
docker build --build-arg RELEASE=$RELEASE -t coderus/sailfishos-platform-sdk:latest -f Dockerfile.all .
docker tag coderus/sailfishos-platform-sdk:latest coderus/sailfishos-platform-sdk:$RELEASE
docker push coderus/sailfishos-platform-sdk:latest
docker push coderus/sailfishos-platform-sdk:$RELEASE
docker rmi -f coderus/sailfishos-platform-sdk:$RELEASE
docker rmi -f coderus/sailfishos-platform-sdk:latest
- name: Setup i486
run: |
set -x
docker build --build-arg RELEASE=$RELEASE --build-arg ARCH=i486 -t coderus/sailfishos-platform-sdk-i486:latest -f Dockerfile.arch .
docker tag coderus/sailfishos-platform-sdk-i486:latest coderus/sailfishos-platform-sdk-i486:$RELEASE
docker push coderus/sailfishos-platform-sdk-i486:latest
docker push coderus/sailfishos-platform-sdk-i486:$RELEASE
docker rmi -f coderus/sailfishos-platform-sdk-i486:$RELEASE
docker rmi -f coderus/sailfishos-platform-sdk-i486:latest
sudo rm -rf build/target-i486.tar
- name: Setup armv7hl
run: |
set -x
docker build --build-arg RELEASE=$RELEASE --build-arg ARCH=armv7hl -t coderus/sailfishos-platform-sdk-armv7hl:latest -f Dockerfile.arch .
docker tag coderus/sailfishos-platform-sdk-armv7hl:latest coderus/sailfishos-platform-sdk-armv7hl:$RELEASE
docker push coderus/sailfishos-platform-sdk-armv7hl:latest
docker push coderus/sailfishos-platform-sdk-armv7hl:$RELEASE
docker rmi -f coderus/sailfishos-platform-sdk-armv7hl:$RELEASE
docker rmi -f coderus/sailfishos-platform-sdk-armv7hl:latest
sudo rm -rf build/target-armv7hl.tar
- name: Setup aarch64
run: |
set -x
docker build --build-arg RELEASE=$RELEASE --build-arg ARCH=aarch64 -t coderus/sailfishos-platform-sdk-aarch64:latest -f Dockerfile.arch .
docker tag coderus/sailfishos-platform-sdk-aarch64:latest coderus/sailfishos-platform-sdk-aarch64:$RELEASE
docker push coderus/sailfishos-platform-sdk-aarch64:latest
docker push coderus/sailfishos-platform-sdk-aarch64:$RELEASE
docker rmi -f coderus/sailfishos-platform-sdk-aarch64:$RELEASE
docker rmi -f coderus/sailfishos-platform-sdk-aarch64:latest
sudo rm -rf build/target-aarch64.tar