diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c69e80d73e29c45d9aaa68dd56bbc0342acbe695..bcc20c87877d7b929e4912322e7086a6e842fefe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,18 +23,36 @@ build: reports: dotenv: build.env +# fetch config files that are the same for all packs, e.g. git-cliff +fetch-configs: + stage: build + rules: + - if: $CI_COMMIT_TAG + variables: + # we just need the artifacts and don't need up-to-date source, so don't even fetch + GIT_STRATEGY: none + # we don't need anything in node_modules or python, so don't fetch the cache + cache: [] + script: + - 'curl -H "PRIVATE-TOKEN: $COMMON_CI_API_TOKEN" "https://gitlab.phaidra.org/api/v4/projects/1469/repository/files/cliff.toml/raw/?ref=main" > cliff.toml' + artifacts: + paths: + - cliff.toml + changelog: image: name: orhunp/git-cliff:latest entrypoint: [""] rules: - if: $CI_COMMIT_TAG + needs: + - job: fetch-configs + artifacts: true variables: GIT_STRATEGY: clone # clone entire repo instead of reusing workspace GIT_DEPTH: 0 # avoid shallow clone to give cliff all the info it needs stage: build script: - - 'curl -H "PRIVATE-TOKEN: $COMMON_CI_API_TOKEN" "https://gitlab.phaidra.org/api/v4/projects/1469/repository/files/cliff.toml/raw/?ref=main" > cliff.toml' - git-cliff --latest -o CHANGELOG.md artifacts: paths: