Skip to content

Commit

Permalink
ci: only update readme during release artifact (#570)
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
  • Loading branch information
JeffreyDallas committed Sep 16, 2024
1 parent 15314c9 commit 18b412d
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 6 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/flow-deploy-release-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,20 @@ permissions:
id-token: write

jobs:
update-readme:
name: "Update README.md"
uses: ./.github/workflows/flow-update-readme.yaml
with:
commit-changes: true
secrets:
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
GH_ACCESS_GPG_KEY: ${{ secrets.GH_ACCESS_GPG_KEY }}
GH_ACCESS_PASSPHRASE: ${{ secrets.GH_ACCESS_PASSPHRASE }}

prepare-release:
name: Release / Prepare
runs-on: solo-linux-medium
needs: update-readme
outputs:
version: ${{ steps.tag.outputs.version }}
steps:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/flow-pull-request-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ jobs:
with:
custom-job-label: Standard

update-readme:
name: "Update README.md"
uses: ./.github/workflows/flow-update-readme.yaml
with:
commit-changes: false
secrets:
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
GH_ACCESS_GPG_KEY: ${{ secrets.GH_ACCESS_GPG_KEY }}
GH_ACCESS_PASSPHRASE: ${{ secrets.GH_ACCESS_PASSPHRASE }}

e2e-standard-tests:
name: E2E Tests
if: ${{ !cancelled() && always() }}
Expand Down
30 changes: 24 additions & 6 deletions .github/workflows/flow-update-readme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,37 @@

name: Update README.md
on:
workflow_dispatch:
workflow_call:
secrets:
GH_ACCESS_TOKEN:
description: "GitHub Access Token"
required: true
GH_ACCESS_GPG_KEY:
description: "GitHub Access GPG Key"
required: true
GH_ACCESS_PASSPHRASE:
description: "GitHub Access Passphrase"
required: true
inputs:
commit-changes:
description: "Commit updated README.md"
type: boolean
required: false
default: false
push:
branches:
- main
paths:
- '**/*.mjs'
- '**/*.js'
- '**/package*.json'
- '**/README.md.template'

defaults:
run:
shell: bash

permissions:
contents: read

jobs:
update:
runs-on: solo-linux-medium
Expand All @@ -38,7 +55,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
token: ${{secrets.GH_ACCESS_TOKEN}}
token: ${{ secrets.GH_ACCESS_TOKEN }}

- name: Setup Node with Retry
uses: Wandalen/wretry.action@6feedb7dedadeb826de0f45ff482b53b379a7844 # v3.5.0
Expand Down Expand Up @@ -96,7 +113,7 @@ jobs:
export KIND_CREATE_CLUSTER_OUTPUT=$( kind create cluster -n "${SOLO_CLUSTER_NAME}" 2>&1 | tee test.log )
export SOLO_INIT_OUTPUT=$( solo init -t v0.42.5 -i node1,node2,node3 -n "${SOLO_NAMESPACE}" -s \
export SOLO_INIT_OUTPUT=$( solo init -i node1,node2,node3 -n "${SOLO_NAMESPACE}" -s \
"${SOLO_CLUSTER_SETUP_NAMESPACE}" | tee test.log )
export SOLO_NODE_KEYS_OUTPUT=$( solo node keys --gossip-keys --tls-keys | tee test.log )
Expand All @@ -113,7 +130,7 @@ jobs:
export SOLO_RELAY_DEPLAY_OUTPUT=$( solo relay deploy -i node1,node2 | tee test.log )
export SOLO_INIT_047_OUTPUT=$( solo init -t v0.48.0-alpha.0 -i node1,node2,node3 -n "${SOLO_NAMESPACE}" \
export SOLO_INIT_047_OUTPUT=$( solo init -i node1,node2,node3 -n "${SOLO_NAMESPACE}" \
-s "${SOLO_CLUSTER_SETUP_NAMESPACE}" --key-format pem | tee test.log )
export SOLO_NODE_KEY_PEM_OUTPUT=$( solo node keys --gossip-keys --tls-keys --key-format pem | tee test.log )
Expand Down Expand Up @@ -166,6 +183,7 @@ jobs:
git_commit_gpgsign: true

- name: Commit README.md Changes
if : ${{ inputs.commit-changes == 'true' }}
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
with:
commit_message: "auto update README.md [skip ci]"
Expand Down
3 changes: 3 additions & 0 deletions README.md.template
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ solo node start -i node1,node2,node3 --debug-nodeid node2
```

Once you see the following message, you can launch jvm debugger from Intellij

```
❯ Check all nodes are ACTIVE
Check node: node1,
Expand All @@ -412,6 +413,7 @@ solo node add --gossip-keys --tls-keys --node-id node4 --debug-nodeid node4 --lo
```

Example 3: attach jvm debugger with node update operation

```bash
./test/e2e/setup-e2e.sh
solo node keys --gossip-keys --tls-keys
Expand All @@ -422,6 +424,7 @@ solo node update --node-id node2 --debug-nodeid node2 --local-build-path ../hed
```

Example 4: attach jvm debugger with node delete operation

```bash
./test/e2e/setup-e2e.sh
solo node keys --gossip-keys --tls-keys
Expand Down

0 comments on commit 18b412d

Please sign in to comment.