-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add workflow for node execution #267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
0847f40
130b1c6
a715fde
63ca2fd
407d6f3
95c86ea
6d81133
642d96d
d43fdb3
6a9e100
ce7b9de
c1c9011
00c9be9
47b731f
5f16eab
5433461
74a2af7
1f56793
dffe886
17c9693
5a1aa29
3ce35c7
8ad9ad7
61eb246
3ec4f05
3c0b2d4
a5b2591
1fe4d53
d8067f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,11 +2,155 @@ name: Run Node in Chain | |||||||||||||
|
|
||||||||||||||
| on: | ||||||||||||||
| workflow_dispatch: | ||||||||||||||
| inputs: | ||||||||||||||
| nethermind-image: | ||||||||||||||
| description: Nethermind Arbitrum docker image | ||||||||||||||
| required: true | ||||||||||||||
| nitro-image: | ||||||||||||||
| description: Nitro docker image | ||||||||||||||
| required: true | ||||||||||||||
| chain: | ||||||||||||||
| description: Chain name | ||||||||||||||
| required: true | ||||||||||||||
| default: sepolia | ||||||||||||||
| type: choice | ||||||||||||||
| options: | ||||||||||||||
| - sepolia | ||||||||||||||
| - mainnet | ||||||||||||||
| timeout: | ||||||||||||||
| description: Timeout in hours for the machine to be auto removed | ||||||||||||||
| required: false | ||||||||||||||
| type: number | ||||||||||||||
| default: 24 | ||||||||||||||
| ssh-keys: | ||||||||||||||
| description: Comma separated SSH keys to add to the machine | ||||||||||||||
| required: false | ||||||||||||||
| type: string | ||||||||||||||
| default: "" | ||||||||||||||
| allowed-ips: | ||||||||||||||
| description: Comma separated allowed IPs to allow in the machine firewall | ||||||||||||||
| required: false | ||||||||||||||
| type: string | ||||||||||||||
| default: "" | ||||||||||||||
| tags: | ||||||||||||||
| description: Comma separated tags for the machine | ||||||||||||||
| required: false | ||||||||||||||
| type: string | ||||||||||||||
| default: "" | ||||||||||||||
|
|
||||||||||||||
| jobs: | ||||||||||||||
| run-node: | ||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||
| env: | ||||||||||||||
| WORKFLOW_REF: "main" | ||||||||||||||
| # Generated by the workflow | ||||||||||||||
| BASE_TAG: "" | ||||||||||||||
| steps: | ||||||||||||||
| # Mock workflow | ||||||||||||||
| - name: Checkout repository | ||||||||||||||
| uses: actions/checkout@v5 | ||||||||||||||
|
|
||||||||||||||
| - name: Authenticate App | ||||||||||||||
| id: gh-app | ||||||||||||||
| uses: actions/create-github-app-token@v2 | ||||||||||||||
| with: | ||||||||||||||
| app-id: ${{ vars.APP_ID }} | ||||||||||||||
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | ||||||||||||||
| repositories: "post-merge-smoke-tests" | ||||||||||||||
|
|
||||||||||||||
| - name: Set up Python | ||||||||||||||
| uses: actions/setup-python@v6 | ||||||||||||||
|
||||||||||||||
| uses: actions/setup-python@v6 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' |
Copilot
AI
Dec 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The step extracts the Run ID using grep -oP, which requires GNU grep. This may fail on systems with BSD grep (like macOS). Additionally, if the workflow log format changes, this parsing could break. Consider using the output from the wait_for_workflow.sh script directly (line 81 writes to GITHUB_OUTPUT) instead of parsing the log file.
AnkushinDaniil marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Dec 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The step assumes there will always be at least one file in the downloaded-artifacts/machine-details directory. If the directory is empty or doesn't exist, the ls | head -n 1 command will fail. Add validation to check if files exist before attempting to read them.
| run: | | |
| run: | | |
| if [ ! -d "downloaded-artifacts/machine-details" ] || [ -z "$(ls -A downloaded-artifacts/machine-details 2>/dev/null)" ]; then | |
| echo "Error: No machine details files found in downloaded-artifacts/machine-details." >&2 | |
| exit 1 | |
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow sets
WORKFLOW_REF: "main"but this value is hardcoded. If this workflow needs to run against different branches (for testing or deployment), this should be made configurable through workflow inputs or derived from the context. Consider adding it as an optional input parameter with "main" as the default.