Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 7f3a6e1

Browse files
handle substrate-node-template and substrate-parachain-template (#6541)
1 parent 0ac8822 commit 7f3a6e1

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

scripts/ci/gitlab/pipeline/publish.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,24 +215,37 @@ publish-rustdoc:
215215
after_script:
216216
- rm -rf .git/ ./*
217217

218-
# Ref: https://github.com/paritytech/opstooling/issues/111
219-
update-node-template:
218+
.update-substrate-template-repository:
220219
stage: publish
221220
extends: .kubernetes-env
222221
variables:
223-
GIT_STRATEGY: none
222+
GIT_STRATEGY: none
224223
rules:
225224
# The template is only updated for FINAL releases
226225
# i.e. the rule should not cover RC or patch releases
227-
- if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+$/ # e.g. v1.0
228-
- if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/ # e.g. v1.0.0
226+
- if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+$/ # e.g. v1.0
227+
- if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/ # e.g. v1.0.0
229228
script:
230229
- git clone --depth=1 --branch="$PIPELINE_SCRIPTS_TAG" https://github.com/paritytech/pipeline-scripts
231230
- export POLKADOT_BRANCH="polkadot-v$CI_COMMIT_TAG"
232231
- git clone --depth=1 --branch="$POLKADOT_BRANCH" https://github.com/paritytech/substrate
233232
- cd substrate
234233
- ../pipeline-scripts/update_substrate_template.sh
235-
--repo-name "substrate-node-template"
236-
--template-path "bin/node-template"
234+
--repo-name "$TARGET_REPOSITORY"
235+
--template-path "$TEMPLATE_PATH"
237236
--github-api-token "$GITHUB_TOKEN"
238237
--polkadot-branch "$POLKADOT_BRANCH"
238+
239+
# Ref: https://github.com/paritytech/opstooling/issues/111
240+
update-node-template:
241+
extends: .update-substrate-template-repository
242+
variables:
243+
TARGET_REPOSITORY: substrate-node-template
244+
TEMPLATE_PATH: bin/node-template
245+
246+
# Ref: https://github.com/paritytech/opstooling/issues/111
247+
update-parachain-template:
248+
extends: .update-substrate-template-repository
249+
variables:
250+
TARGET_REPOSITORY: substrate-parachain-template
251+
TEMPLATE_PATH: parachain-template

0 commit comments

Comments
 (0)