]> git.proxmox.com Git - mirror_linux-firmware.git/blob - .gitlab-ci.yml
Merge branch 'mlimonci/encoding' into 'main'
[mirror_linux-firmware.git] / .gitlab-ci.yml
1 .debcommon: &debcommon
2 - apt update
3 - apt install build-essential debhelper git python3-jinja2 -y
4 - make deb
5
6 .rpmcommon: &rpmcommon
7 - dnf install make git python3-jinja2 rpmdevtools -y
8 - make rpm
9
10 check-commits:
11 stage: test
12 image: registry.gitlab.com/kernel-firmware/linux-firmware
13 rules:
14 - if: $CI_MERGE_REQUEST_ID
15 script:
16 - ci-fairy check-commits --signed-off-by --textwidth=0
17
18 pre-commit:
19 stage: test
20 image: registry.gitlab.com/kernel-firmware/linux-firmware
21 rules:
22 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
23 - if: $CI_COMMIT_TAG
24 - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
25 script:
26 - pre-commit run --all-files
27
28 deb-release:
29 stage: deploy
30 image: debian
31 rules:
32 - if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
33 when: never
34 - if: $RELEASE_TOKEN
35 - if: $CI_COMMIT_TAG
36 artifacts:
37 paths:
38 - dist/*
39 script:
40 - *debcommon
41
42 rpm-release:
43 stage: deploy
44 image: fedora
45 rules:
46 - if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
47 when: never
48 - if: $RELEASE_TOKEN
49 - if: $CI_COMMIT_TAG
50 artifacts:
51 paths:
52 - dist/*
53 script:
54 - *rpmcommon
55
56 release:
57 stage: deploy
58 rules:
59 - if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
60 when: never
61 - if: $RELEASE_TOKEN
62 artifacts:
63 paths:
64 - dist/*
65 script:
66 - CI_PUSH_REPO=`echo "$CI_REPOSITORY_URL" | sed 's/^.*@/@/g'`
67 - git remote set-url --push origin "https://gitlab-ci-token:${RELEASE_TOKEN}$CI_PUSH_REPO"
68 - git tag `date "+%Y%m%d"`
69 - git push --tags
70 - make dist