Skip to content

chore: add basenames disbursement15 #28

chore: add basenames disbursement15

chore: add basenames disbursement15 #28

name: Validate Upgrade Structure
on:
pull_request:
branches: [ main ]
paths:
- 'mainnet/**'
- 'sepolia/**'
push:
branches: [ main ]
paths:
- 'mainnet/**'
- 'sepolia/**'
jobs:
validate-structure:
name: Validate Upgrade Folder Structure
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # Need full history to detect changed files
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: 'validation-tool-interface/package-lock.json'
- name: Install dependencies
working-directory: ./validation-tool-interface
run: npm ci
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@2d756ea4c53f7f6b397767d8723b3a10a9f35bf2 # v44.0.0
with:
files: |
mainnet/**
sepolia/**
- name: Run structure validation
if: steps.changed-files.outputs.any_changed == 'true'
working-directory: ./validation-tool-interface
run: |
echo "Changed files:"
echo "${{ steps.changed-files.outputs.all_changed_files }}"
npx tsx scripts/validate-structure.ts "${{ steps.changed-files.outputs.all_changed_files }}"
- name: Comment PR on validation failure
if: failure() && github.event_name == 'pull_request'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `## ❌ Upgrade Structure Validation Failed
The validation check found issues with your upgrade folder structure. Please ensure:
1. **All upgrade folders have a \`validations/\` subdirectory**
2. **Each \`validations/\` folder contains at least one config file:**
- \`base-nested.json\` (for Coinbase validation)
- \`base-sc.json\` (for Base SC validation)
- \`op.json\` (for OP validation)
3. **All JSON files are valid and follow the correct schema**
Please check the CI logs above for specific error details and fix the issues before merging.
📖 See the [validation documentation](docs/folder-format.md) for more details.
To disable the validation check please add a validation.yml file to your upgrade folder with 'disabled': true`
})