diff --git a/.gitignore b/.gitignore index f11892d..5bd20ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2023 Tobias Schmidl +# SPDX-License-Identifier: CC0-1.0 ### Vim # Swap diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b36a8a5..533d7d4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,16 +1,7 @@ -# To contribute improvements to CI/CD templates, please follow the Development guide at: -# https://docs.gitlab.com/ee/development/cicd/templates.html -# This specific template is located at: -# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Docker.gitlab-ci.yml - -# Build a Docker image with CI/CD and push to the GitLab registry. -# Docker-in-Docker documentation: https://docs.gitlab.com/ee/ci/docker/using_docker_build.html -# -# This template uses one generic job with conditional builds -# for the default branch and all other (MR) branches. +# SPDX-FileCopyrightText: 2023 Tobias Schmidl +# SPDX-License-Identifier: CC0-1.0 docker-build: - # Use the official docker image. image: docker:latest stage: build services: @@ -28,7 +19,12 @@ docker-build: tag=":$CI_COMMIT_REF_SLUG" echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag" fi - - docker build --pull --label org.label-schema.build-date=$(date -u +'%FT%H:%M:%SZ') --label org.label-schema.name="${NAME}" --label org.label-schema.vcs-url="${CI_PROJECT_URL}" --label org.label-schema.vcs-ref="${CI_COMMIT_SHA:0:8}" -t "${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_NAME}:${CI_COMMIT_SHA:0:8}" -t "$CI_REGISTRY_IMAGE${tag}" . + - | + docker build --pull \ + --label org.label-schema.build-date=$(date -u +'%FT%H:%M:%SZ') \ + --label org.label-schema.name="${NAME}" --label org.label-schema.vcs-url="${CI_PROJECT_URL}" \ + --label org.label-schema.vcs-ref="${CI_COMMIT_SHA:0:8}" \ + -t "${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_NAME}:${CI_COMMIT_SHA:0:8}" -t "$CI_REGISTRY_IMAGE${tag}" . - docker push "$CI_REGISTRY_IMAGE${tag}" # Run this job in a branch where a Dockerfile exists rules: diff --git a/Dockerfile b/Dockerfile index df45ef5..8024819 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2023 Tobias Schmidl +# SPDX-License-Identifier: CC0-1.0 + FROM alpine LABEL org.label-schema.schema-version="1.0.0-rc1" diff --git a/LICENSES/CC0-1.0.txt b/LICENSES/CC0-1.0.txt new file mode 120000 index 0000000..ea5b606 --- /dev/null +++ b/LICENSES/CC0-1.0.txt @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file