mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
synced 2025-01-03 05:22:37 +00:00
f48da6da55
Link: https://docs.gitlab.com/ee/ci/pipelines/merge_request_pipelines.html#use-rules-to-add-jobs Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
34 lines
870 B
YAML
34 lines
870 B
YAML
check-commits:
|
|
stage: test
|
|
image: registry.gitlab.com/kernel-firmware/linux-firmware
|
|
rules:
|
|
- if: $CI_MERGE_REQUEST_ID
|
|
script:
|
|
- ci-fairy check-commits --signed-off-by --textwidth=0
|
|
|
|
pre-commit:
|
|
stage: test
|
|
image: registry.gitlab.com/kernel-firmware/linux-firmware
|
|
rules:
|
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
|
- if: $CI_COMMIT_TAG
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
script:
|
|
- pre-commit run --all-files
|
|
|
|
release:
|
|
stage: deploy
|
|
rules:
|
|
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
|
|
when: never
|
|
- if: $RELEASE_TOKEN
|
|
artifacts:
|
|
paths:
|
|
- dist/*
|
|
script:
|
|
- CI_PUSH_REPO=`echo "$CI_REPOSITORY_URL" | sed 's/^.*@/@/g'`
|
|
- git remote set-url --push origin "https://gitlab-ci-token:${RELEASE_TOKEN}$CI_PUSH_REPO"
|
|
- git tag `date "+%Y%m%d"`
|
|
- git push --tags
|
|
- make dist
|