forked from ayufan-rock64/linux-rootfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
74 lines (61 loc) · 2.18 KB
/
.gitlab-ci.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
image: ayufan/rock64-dockerfiles:x86_64
variables:
GITHUB_USER: pfeerick-rock64
GITHUB_REPO: linux-rootfs
VERSION: ${CI_COMMIT_TAG}
RELEASE_NAME: "${CI_COMMIT_TAG}: gitlab-ci-linux-rootfs-${CI_PIPELINE_ID}"
PIPELINE_URL: $CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID
stages: [draft, build, pre-release, release]
before_script:
- 'export CHANGES=$(git tag -l --format="%(contents)" "$CI_COMMIT_TAG")'
- 'export DESCRIPTION=$(echo -e "${CHANGES}\n\n${PIPELINE_URL}")'
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
- update-binfmts --display
draft:
stage: draft
only: [tags]
script:
- github-release release --tag "${VERSION}" --name "$RELEASE_NAME" --description "$DESCRIPTION" --target "$CI_COMMIT_SHA" --draft
pre-release:
stage: pre-release
only: [tags]
environment:
name: pre-release
url: https://github.com/$GITHUB_USER/$GITHUB_REPO/releases/tag/$CI_COMMIT_TAG
script:
- github-release edit --tag "${VERSION}" --name "$RELEASE_NAME" --description "$DESCRIPTION" --pre-release
release:
stage: release
only: [tags]
when: manual
environment:
name: release
url: https://github.com/$GITHUB_USER/$GITHUB_REPO/releases/tag/$CI_COMMIT_TAG
script:
- github-release edit --tag "${VERSION}" --name "$RELEASE_NAME" --description "$DESCRIPTION"
.build: &build
stage: build
only: [tags]
script:
- make "$CI_JOB_NAME"
- github-release upload --tag "${VERSION}" --name "$(basename *.xz)" --file *.xz
ubuntu-bionic-mate-armhf: *build
ubuntu-bionic-mate-arm64: *build
ubuntu-xenial-mate-armhf: *build
ubuntu-xenial-mate-arm64: *build
ubuntu-bionic-i3-armhf: *build
ubuntu-bionic-i3-arm64: *build
ubuntu-xenial-i3-armhf: *build
ubuntu-xenial-i3-arm64: *build
debian-jessie-openmediavault-armhf: *build
debian-jessie-openmediavault-arm64: *build
debian-stretch-openmediavault-armhf: *build
debian-stretch-openmediavault-arm64: *build
debian-jessie-minimal-armhf: *build
debian-jessie-minimal-arm64: *build
debian-stretch-minimal-armhf: *build
debian-stretch-minimal-arm64: *build
ubuntu-xenial-minimal-armhf: *build
ubuntu-xenial-minimal-arm64: *build
ubuntu-bionic-minimal-armhf: *build
ubuntu-bionic-minimal-arm64: *build