mirror of
https://gitlab.com/sfz.aalen/infra/fabaccess.git
synced 2025-03-12 06:51:46 +01:00
20 lines
626 B
YAML
20 lines
626 B
YAML
|
variables:
|
||
|
SFZ_REGISTRY_IMAGE: $SFZ_REGISTRY/$CI_PROJECT_PATH
|
||
|
|
||
|
docker-build:
|
||
|
image: quay.io/podman/stable
|
||
|
stage: build
|
||
|
before_script:
|
||
|
- podman login -u "$SFZ_REGISTRY_USER" -p "$SFZ_REGISTRY_PASSWORD" $SFZ_REGISTRY
|
||
|
# Default branch leaves tag empty (= latest tag)
|
||
|
# All other branches are tagged with the escaped branch name (commit ref slug)
|
||
|
script:
|
||
|
- tag=$(date +%s)
|
||
|
- podman build --pull -t "$SFZ_REGISTRY_IMAGE:${tag}" .
|
||
|
- podman push "$SFZ_REGISTRY_IMAGE:${tag}"
|
||
|
# Run this job in a branch where a Dockerfile exists
|
||
|
rules:
|
||
|
- if: $CI_COMMIT_BRANCH
|
||
|
exists:
|
||
|
- Dockerfile
|