.gitlab-ci.yml improved

This commit is contained in:
Oscar Krause 2022-12-29 10:44:39 +01:00
parent a59b720f3f
commit 47312f65d9

View File

@ -149,14 +149,15 @@ test:archlinux:
- pacman -Sy - pacman -Sy
- pacman -U --noconfirm *.pkg.tar.zst - pacman -U --noconfirm *.pkg.tar.zst
deploy:docker: .deploy:
stage: deploy
rules: rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- changes: - if: $CI_COMMIT_TAG
- Dockerfile when: never
- requirements.txt
- app/**/* deploy:docker:
extends: .deploy
stage: deploy
before_script: before_script:
- echo "COMMIT=${CI_COMMIT_SHA}" >> version.env - echo "COMMIT=${CI_COMMIT_SHA}" >> version.env
- source version.env - source version.env
@ -177,10 +178,9 @@ deploy:docker:
deploy:apt: deploy:apt:
# doc: https://git.collinwebdesigns.de/help/user/packages/debian_repository/index.md#install-a-package # doc: https://git.collinwebdesigns.de/help/user/packages/debian_repository/index.md#install-a-package
extends: .deploy
image: debian:bookworm-slim image: debian:bookworm-slim
stage: deploy stage: deploy
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
needs: needs:
- job: build:apt - job: build:apt
artifacts: true artifacts: true
@ -217,13 +217,12 @@ deploy:apt:
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ${EXPORT_NAME} "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${PACKAGE_NAME}/${PACKAGE_VERSION}/${EXPORT_NAME}"' - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ${EXPORT_NAME} "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${PACKAGE_NAME}/${PACKAGE_VERSION}/${EXPORT_NAME}"'
deploy:pacman: deploy:pacman:
extends: .deploy
image: archlinux:base-devel image: archlinux:base-devel
stage: deploy stage: deploy
needs: needs:
- job: build:pacman - job: build:pacman
artifacts: true artifacts: true
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script: script:
- source .PKGBUILD/PKGBUILD - source .PKGBUILD/PKGBUILD
# fastapi-dls-1.0-1-any.pkg.tar.zst # fastapi-dls-1.0-1-any.pkg.tar.zst