Switched to net9 and finished event workflow
This commit is contained in:
41
.gitlab-ci.yml
Normal file
41
.gitlab-ci.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- publish
|
||||
|
||||
variables:
|
||||
DOCKER_IMAGE: registry.leon-hoppe.de/leon.hoppe/spotiparty
|
||||
|
||||
build:
|
||||
stage: build
|
||||
image: mcr.microsoft.com/dotnet/sdk:9.0
|
||||
script:
|
||||
- dotnet restore
|
||||
- dotnet build --configuration Release --no-restore
|
||||
artifacts:
|
||||
paths:
|
||||
- "**/bin/Release"
|
||||
expire_in: 10 minutes
|
||||
|
||||
test:
|
||||
stage: test
|
||||
image: mcr.microsoft.com/dotnet/sdk:9.0
|
||||
script:
|
||||
- dotnet test --verbosity normal
|
||||
dependencies:
|
||||
- build
|
||||
|
||||
publish:
|
||||
stage: publish
|
||||
tags:
|
||||
- docker
|
||||
before_script:
|
||||
- git lfs pull
|
||||
script:
|
||||
- export VERSION=$(echo $CI_COMMIT_TAG | sed 's/^v//')
|
||||
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin registry.leon-hoppe.de
|
||||
- docker build -t $DOCKER_IMAGE:$VERSION -t $DOCKER_IMAGE:latest -f SpotiParty.Web/Dockerfile .
|
||||
- docker push $DOCKER_IMAGE:$VERSION
|
||||
- docker push $DOCKER_IMAGE:latest
|
||||
only:
|
||||
- tags
|
||||
Reference in New Issue
Block a user