Skip to content
Snippets Groups Projects
Commit d69cfcfe authored by Emmanuel Raviart's avatar Emmanuel Raviart
Browse files

Trigger @openfisca/json-model pipeline only when a new tag has been created.

parent 3960e47e
No related branches found
No related tags found
1 merge request!2Rework CI
Pipeline #1058 passed
...@@ -100,4 +100,9 @@ sync_with_openfisca_france: ...@@ -100,4 +100,9 @@ sync_with_openfisca_france:
trigger_openfisca_json_model: trigger_openfisca_json_model:
stage: trigger stage: trigger
only:
# OpenFisca-JSON-Model pipeline should only be called
# when a new version branch and version tag has been created.
# Here we assume that tags are only created for versions.
- tags
trigger: openfisca/json-model trigger: openfisca/json-model
...@@ -75,7 +75,7 @@ async function main() { ...@@ -75,7 +75,7 @@ async function main() {
await fs.writeFile(projectTomlPath, projectToml, "utf-8") await fs.writeFile(projectTomlPath, projectToml, "utf-8")
await $`git add .` await $`git add .`
// Commit updated pyproject.tomls in a new branch tagged with version number. // Commit updated pyproject.toml in a new branch tagged with version number.
const branch = nextVersion.replace(/\./g, "_") const branch = nextVersion.replace(/\./g, "_")
await $`git switch -c ${branch}` await $`git switch -c ${branch}`
await $`git commit -m "${nextVersion} (openfisca-france@${openFiscaFranceVersion})"` await $`git commit -m "${nextVersion} (openfisca-france@${openFiscaFranceVersion})"`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment