mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-utils.git
synced 2026-07-12 06:25:43 +00:00
94bacf6e8a
sync-nova-base.yml checked out and PR'd against whatever branch GitHub considers the repo default - which is 'main', a read-only mirror kept in sync FROM master (auto-pr.yml/auto-merge.yml only flow master -> main, never the reverse). master is what the live app actually fetches configs from (see wallet-android's CHAINS_URL etc. all pointing at .../master/...). Net effect: every one of the 29 accumulated 'Sync from Nova Base' PRs (#1 through #36, 2026-02-09 through 2026-07-09) landed on a branch nothing downstream ever reads, so 5 months of upstream Nova chain/RPC/asset maintenance never reached production regardless of whether those PRs got merged. Explicit ref/base: master makes future runs target the branch that actually matters; the 29 stale main-targeted PRs are being closed as superseded now that #36's content has been applied to master directly (see next commit).
109 lines
3.3 KiB
YAML
109 lines
3.3 KiB
YAML
name: Sync from Nova Base
|
|
|
|
on:
|
|
# Run daily at 6:00 AM UTC
|
|
schedule:
|
|
- cron: '0 6 * * *'
|
|
|
|
# Allow manual trigger
|
|
workflow_dispatch:
|
|
inputs:
|
|
force_update:
|
|
description: 'Force update even if no changes'
|
|
required: false
|
|
default: 'false'
|
|
type: boolean
|
|
|
|
jobs:
|
|
sync:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: master
|
|
submodules: recursive
|
|
fetch-depth: 0
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Update nova-base submodule to latest
|
|
run: |
|
|
cd nova-base
|
|
git fetch origin master
|
|
git checkout origin/master
|
|
cd ..
|
|
echo "NOVA_COMMIT=$(cd nova-base && git rev-parse --short HEAD)" >> $GITHUB_ENV
|
|
|
|
- name: Check for changes in nova-base
|
|
id: check_changes
|
|
run: |
|
|
if git diff --quiet nova-base; then
|
|
echo "has_changes=false" >> $GITHUB_OUTPUT
|
|
echo "No changes in nova-base"
|
|
else
|
|
echo "has_changes=true" >> $GITHUB_OUTPUT
|
|
echo "Changes detected in nova-base"
|
|
fi
|
|
|
|
- name: Set up Python
|
|
if: steps.check_changes.outputs.has_changes == 'true' || inputs.force_update == 'true'
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Run sync script
|
|
if: steps.check_changes.outputs.has_changes == 'true' || inputs.force_update == 'true'
|
|
run: |
|
|
python scripts/sync_from_nova.py
|
|
|
|
- name: Check for output changes
|
|
if: steps.check_changes.outputs.has_changes == 'true' || inputs.force_update == 'true'
|
|
id: check_output
|
|
run: |
|
|
if git diff --quiet chains/ xcm/ icons/; then
|
|
echo "output_changed=false" >> $GITHUB_OUTPUT
|
|
echo "No output changes after sync"
|
|
else
|
|
echo "output_changed=true" >> $GITHUB_OUTPUT
|
|
echo "Output files changed"
|
|
git diff --stat chains/ xcm/ icons/
|
|
fi
|
|
|
|
- name: Create Pull Request
|
|
if: steps.check_output.outputs.output_changed == 'true'
|
|
uses: peter-evans/create-pull-request@v6
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
commit-message: "chore: sync from nova-base (${{ env.NOVA_COMMIT }})"
|
|
title: "🔄 Sync from Nova Base"
|
|
body: |
|
|
## Automated Nova Base Sync
|
|
|
|
This PR syncs the latest changes from [nova-utils](https://github.com/novasamatech/nova-utils).
|
|
|
|
**Nova commit:** `${{ env.NOVA_COMMIT }}`
|
|
|
|
### Changes included:
|
|
- Updated chain configurations
|
|
- Updated XCM transfer configs
|
|
- Updated icons
|
|
|
|
---
|
|
*This PR was automatically created by the sync workflow.*
|
|
branch: sync/nova-base-${{ env.NOVA_COMMIT }}
|
|
base: master
|
|
delete-branch: true
|
|
labels: |
|
|
automated
|
|
sync
|
|
dependencies
|
|
|
|
- name: Auto-merge if tests pass
|
|
if: steps.check_output.outputs.output_changed == 'true'
|
|
run: |
|
|
echo "PR created. Review and merge to apply Nova updates."
|