Skip to content
Open
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
142 changes: 142 additions & 0 deletions .github/workflows/sync-default-configs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Sync default seid configs

# Rebuilds the latest tagged seid release, runs `seid init`, and pipes the
# resulting app.toml / config.toml / client.toml plus the folder tree into
# content/node/default-configs.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 default-configs.mdx
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/default-configs.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).

Regenerates `content/node/default-configs.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`, `client.toml`,
and folder structure in sync with what node operators actually get
when they install the latest `seid`.

## Describe the changes to the documentation
Updates the auto-generated section of `content/node/default-configs.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/default-configs.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 @@ -7,6 +7,7 @@ export default {
title: 'Node Operations'
},
'node-operators': 'Overview',
'default-configs': 'Default Config Reference',
seictl: 'Seictl Setup Helper',
statesync: 'Statesync',
snapshot: 'Snapshot Sync',
Expand Down
Loading
Loading