ayaports/.gitlab-ci.yml

61 lines
1.1 KiB
YAML
Raw Normal View History

2022-08-14 19:52:11 +00:00
stages:
- verify
- build
- deploy
2022-08-14 19:52:11 +00:00
variables:
GIT_STRATEGY: clone
GIT_DEPTH: "500"
lint:
stage: verify
interruptible: true
script:
- |
sudo apk add shellcheck atools doas abuild
export PATH="$PATH:$CI_PROJECT_DIR/.gitlab/bin"
lint
2022-08-14 19:52:11 +00:00
allow_failure: true
only:
- merge_requests
tags:
2023-02-10 05:37:40 +00:00
- apk-$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
2022-08-14 19:52:11 +00:00
build:
stage: build
2022-08-14 19:52:11 +00:00
interruptible: true
script:
- |
sudo apk add alpine-sdk lua-aports doas
doas addgroup $USER abuild
export PATH="$PATH:$CI_PROJECT_DIR/.gitlab/bin"
sudo -Eu $USER build.sh
2022-08-14 19:52:11 +00:00
artifacts:
paths:
- packages/
- keys/
- logs/
expire_in: 7 days
2022-08-14 19:52:11 +00:00
when: always
only:
- merge_requests
tags:
2023-02-10 05:37:40 +00:00
- apk-$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
2022-08-14 19:52:11 +00:00
push:
interruptible: true
stage: deploy
needs:
- job: build
artifacts: true
script:
- |
2023-02-10 05:37:40 +00:00
sudo apk add abuild git-lfs
export PATH="$PATH:$CI_PROJECT_DIR/.gitlab/bin"
push.sh
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: manual
tags:
2023-02-10 05:37:40 +00:00
- apk-$CI_MERGE_REQUEST_TARGET_BRANCH_NAME