Skip to content
Snippets Groups Projects
Commit 38d42d65 authored by McCarthy, Samuel (ITS Product Mgmt)'s avatar McCarthy, Samuel (ITS Product Mgmt)
Browse files

Update file apptainer-build-ci.yml

parents
No related branches found
No related tags found
No related merge requests found
stages:
- build
- push
Build:
tags:
- apptainer
- build
stage: build
script:
- apptainer build ${CI_PROJECT_NAME}.sif container.def
# Tag the "main" branch as "latest"
Push latest:
variables:
# We do not need GitLab to clone the source code.
GIT_STRATEGY: none
stage: push
tags:
- apptainer
- build
# Only "main" should be tagged "latest"
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
- apptainer push ${CI_PROJECT_NAME}.sif oras://container-registry.surrey.ac.uk/shared-containers/${CI_PROJECT_NAME}:latest
Push branch:
variables:
# We do not need GitLab to clone the source code.
GIT_STRATEGY: none
stage: push
tags:
- apptainer
- build
rules:
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
script:
- apptainer push ${CI_PROJECT_NAME}.sif oras://container-registry.surrey.ac.uk/shared-containers/${CI_PROJECT_NAME}:SHA_$CI_COMMIT_SHORT_SHA
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment