Skip to content
Snippets Groups Projects
Commit 9a96e5b5 authored by Philipp Stadler's avatar Philipp Stadler
Browse files

fix: fetch cliff config in extra command

parent 896eae5d
Branches
No related tags found
No related merge requests found
...@@ -23,18 +23,36 @@ build: ...@@ -23,18 +23,36 @@ build:
reports: reports:
dotenv: build.env 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: changelog:
image: image:
name: orhunp/git-cliff:latest name: orhunp/git-cliff:latest
entrypoint: [""] entrypoint: [""]
rules: rules:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
needs:
- job: fetch-configs
artifacts: true
variables: variables:
GIT_STRATEGY: clone # clone entire repo instead of reusing workspace GIT_STRATEGY: clone # clone entire repo instead of reusing workspace
GIT_DEPTH: 0 # avoid shallow clone to give cliff all the info it needs GIT_DEPTH: 0 # avoid shallow clone to give cliff all the info it needs
stage: build stage: build
script: 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 - git-cliff --latest -o CHANGELOG.md
artifacts: artifacts:
paths: paths:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment