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

Trigger update-node-template when a final release tag is created #6522

Merged
Merged
22 changes: 22 additions & 0 deletions scripts/ci/gitlab/pipeline/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,25 @@ publish-rustdoc:
- echo "___Rustdoc was successfully published to https://paritytech.github.io/polkadot/___"
after_script:
- rm -rf .git/ ./*

# Ref: https://github.com/paritytech/opstooling/issues/111
update-node-template:
stage: publish
extends: .kubernetes-env
joao-paulo-parity marked this conversation as resolved.
Show resolved Hide resolved
variables:
GIT_STRATEGY: none
rules:
# The template is only updated for FINAL releases
# i.e. the rule should not cover RC or patch releases
- if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+$/ # e.g. v1.0
- if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/ # e.g. v1.0.0
script:
- git clone --depth=1 --branch="$PIPELINE_SCRIPTS_TAG" https://github.com/paritytech/pipeline-scripts
- export POLKADOT_BRANCH="polkadot-v$CI_COMMIT_TAG"
- git clone --depth=1 --branch="$POLKADOT_BRANCH" https://github.com/paritytech/substrate
- cd substrate
- ../pipeline-scripts/update_substrate_template.sh
--repo-name "substrate-node-template"
--template-path "bin/node-template"
--github-api-token "$GITHUB_TOKEN"
--polkadot-branch "$POLKADOT_BRANCH"