update node version #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Copyright (C) 2023-2024 Hedera Hashgraph, LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
## | |
name: Update README.md | |
on: | |
push: | |
branches: | |
- 00121-D-ci-generate-readme | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
update: | |
runs-on: [self-hosted, Linux, medium, ephemeral] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
node-version: 20 | |
cache: npm | |
- name: Setup Kind | |
uses: helm/kind-action@99576bfa6ddf9a8e612d83b513da5a75875caced # v1.9.0 | |
if: ${{ inputs.enable-e2e-tests && !cancelled() && !failure() }} | |
with: | |
install_only: true | |
node_image: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72 | |
version: v0.21.0 | |
kubectl_version: v1.28.6 | |
verbosity: 3 | |
wait: 120s | |
- name: Install Dependencies | |
id: npm-deps | |
run: npm ci | |
- name: Update README.md | |
run: | | |
export SOLO_CLUSTER_NAME=solo | |
export SOLO_NAMESPACE=solo | |
export SOLO_CLUSTER_SETUP_NAMESPACE=solo-cluster | |
echo "Perform the followng kind and solo commands and save output to environment variables" | |
export KIND_CREATE_CLUSTER_OUTPUT=$( kind create cluster -n "${SOLO_CLUSTER_NAME}" 2>&1 | tee /dev/tty ) | |
export SOLO_INIT_OUTPUT=$( solo init -t v0.42.5 -i node0,node1,node2 -n "${SOLO_NAMESPACE}" -s \ | |
"${SOLO_CLUSTER_SETUP_NAMESPACE}" --key-format pfx | tee /dev/tty ) | |
export SOLO_NODE_KEYS_OUTPUT=$( solo node keys --gossip-keys --tls-keys --key-format pfx | tee /dev/tty ) | |
export SOLO_CLUSTER_SETUP_OUTPUT=$( solo cluster setup | tee /dev/tty ) | |
export SOLO_NETWORK_DEPLOY_OUTPUT=$( solo network deploy | tee /dev/tty ) | |
export SOLO_NODE_SETUP_OUTPUT=$( solo node setup | tee /dev/tty ) | |
export SOLO_NODE_START_OUTPUT=$( solo node start | tee /dev/tty ) | |
export SOLO_MIRROR_NODE_DEPLOY_OUTPUT=$( solo mirror-node deploy | tee /dev/tty ) | |
export SOLO_RELAY_DEPLAY_OUTPUT=$( solo relay deploy -i node0,node1 | tee /dev/tty ) | |
export SOLO_INIT_047_OUTPUT=$( solo init -t v0.47.0-alpha.0 -i node0,node1,node2 -n "${SOLO_NAMESPACE}" \ | |
-s "${SOLO_CLUSTER_SETUP_NAMESPACE}" --key-format pem | tee /dev/tty ) | |
export SOLO_NODE_KEY_PEM_OUTPUT=$( solo node keys --gossip-keys --tls-keys --key-format pem | tee /dev/tty ) | |
echo "Generate README.md" | |
envsubst '$KIND_CREATE_CLUSTER_OUTPUT,$SOLO_INIT_OUTPUT,$SOLO_NODE_KEYS_OUTPUT, $SOLO_CLUSTER_SETUP_OUTPUT, \ | |
$SOLO_NETWORK_DEPLOY_OUTPUT,$SOLO_NODE_SETUP_OUTPUT,$SOLO_NODE_START_OUTPUT,$SOLO_MIRROR_NODE_DEPLOY_OUTPUT,\ | |
$SOLO_RELAY_DEPLAY_OUTPUT,$SOLO_INIT_047_OUTPUT,$SOLO_NODE_KEY_PEM_OUTPUT' < README.md.template > README.md | |
echo "Replace username" | |
sed -i "" "s/\/Users\/$(whoami)/\/Users\/yourusername/g" README.md | |
- name: Commit | |
run: | | |
if git diff --exit-code; then | |
echo "No changes to commit." | |
exit 0 | |
else | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git commit -m "update" | |
git push origin main | |
fi |