Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 144 additions & 0 deletions .github/workflows/sync-default-configs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: Sync default seid configs

# Rebuilds the latest tagged seid release, runs `seid init`, and pipes the
# resulting app.toml / config.toml / client.toml into the inlined "Default
# Configurations" section of content/node/node-operators.mdx. If anything
# changed, opens a PR.
#
# Triggers:
# - workflow_dispatch (manual; can override the seid version)
# - schedule (weekly, Mondays 06:00 UTC)

on:
workflow_dispatch:
inputs:
sei_version:
description: 'seid release tag to build (default: latest GitHub release)'
required: false
type: string
default: ''
schedule:
- cron: '0 6 * * 1'

permissions:
contents: write
pull-requests: write

defaults:
run:
shell: bash

jobs:
sync:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout docs
uses: actions/checkout@v4

- name: Resolve seid version
id: version
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INPUT_VERSION: ${{ inputs.sei_version }}
run: |
set -euo pipefail
requested="${INPUT_VERSION:-}"
if [[ -n "$requested" ]]; then
tag="$requested"
echo "Using requested seid tag: $tag"
else
tag=$(gh api repos/sei-protocol/sei-chain/releases/latest --jq .tag_name)
echo "Resolved latest seid tag: $tag"
fi
if [[ -z "$tag" ]]; then
echo "::error::Could not resolve a seid release tag"
exit 1
fi
echo "tag=$tag" >> "$GITHUB_OUTPUT"

- name: Checkout sei-chain
uses: actions/checkout@v4
with:
repository: sei-protocol/sei-chain
ref: ${{ steps.version.outputs.tag }}
path: sei-chain
fetch-depth: 1

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: sei-chain/go.mod
cache-dependency-path: sei-chain/go.sum

- name: Install build helpers
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends tree

- name: Build seid
working-directory: sei-chain
run: |
set -euo pipefail
export PATH="$(go env GOPATH)/bin:$PATH"
make install
seid version --long || seid version

- name: Capture commit SHA
id: commit
working-directory: sei-chain
run: echo "sha=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"

- name: Run seid init
env:
SEI_VERSION: ${{ steps.version.outputs.tag }}
run: |
set -euo pipefail
export PATH="$(go env GOPATH)/bin:$PATH"
rm -rf "$HOME/.sei"
seid init docs-example --chain-id pacific-1
echo "---"
ls -la "$HOME/.sei/config"

- name: Regenerate inlined default configs
env:
SEI_VERSION: ${{ steps.version.outputs.tag }}
SEI_COMMIT: ${{ steps.commit.outputs.sha }}
run: |
export SEI_HOME="$HOME/.sei"
node scripts/sync-default-configs.mjs

- name: Show diff (for log visibility)
run: git --no-pager diff --stat -- content/node/node-operators.mdx || true

- name: Open pull request if changed
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: bot/sync-default-configs
base: main
commit-message: 'docs(node): sync default configs from seid ${{ steps.version.outputs.tag }}'
title: 'docs(node): sync default configs from seid ${{ steps.version.outputs.tag }}'
body: |
Auto-generated by [`sync-default-configs.yml`](.github/workflows/sync-default-configs.yml).

Refreshes the inlined "Default Configurations" tabs in
`content/node/node-operators.mdx` from a fresh `seid init`
against [`sei-chain@${{ steps.version.outputs.tag }}`](https://github.com/sei-protocol/sei-chain/releases/tag/${{ steps.version.outputs.tag }})
(commit `${{ steps.commit.outputs.sha }}`).

## What is the purpose of the change?
Keep the documented default `app.toml`, `config.toml`, and
`client.toml` in sync with what node operators actually get when
they install the latest `seid`.

## Describe the changes to the documentation
Updates the marker-bounded TOML blocks inside
`content/node/node-operators.mdx`. No hand-written prose is touched.

## Notes
If this PR is empty, no defaults changed in the new release.
labels: |
documentation
automated
add-paths: |
content/node/node-operators.mdx
delete-branch: true
1 change: 1 addition & 0 deletions content/node/_meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ export default {
},
'advanced-config-monitoring': 'Advanced Configuration & Monitoring',
'rocksdb-backend': 'RocksDB Backend',
'giga-storage-migration': 'Giga SS Store Migration',
'technical-reference': 'Technical Reference'
};
Loading
Loading