-
Notifications
You must be signed in to change notification settings - Fork 142
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
[wip] testing subnet-evm sync workflow #636
Draft
darioush
wants to merge
24
commits into
master
Choose a base branch
from
sync-subnet-evm-branch
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
ea8f69a
testing workflow
darioush d7cbe89
try again
darioush 97eee86
try
darioush 8e4e48f
try
darioush b363217
try https for remote
darioush 5642d53
move branch spec
darioush 481f8a6
try create pr
darioush 22804b6
try
darioush 7792adc
try
darioush 6cc18ba
try
darioush 33543f6
rm script
darioush aaf1b9c
try
darioush 1dad2f8
restore workflows
darioush d147327
Merge branch 'master' of github.com:ava-labs/coreth into sync-subnet-…
darioush b0e7f41
try rev-parse
darioush 4ac8140
consistent wspace
darioush b233072
more wspace
darioush 089c6b9
more wspace
darioush 91d3ac4
try
darioush e40f060
fixes
darioush 83efa1b
try
darioush 7d0b761
add id
darioush 06bcfde
nit
darioush 5d23039
Merge branch 'master' into sync-subnet-evm-branch
darioush File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ on: | |
remoteBranch: | ||
description: "Subnet EVM Branch" | ||
required: true | ||
default: "master" | ||
default: "coreth-test-0" | ||
|
||
jobs: | ||
sync_branch: | ||
|
@@ -17,4 +17,49 @@ jobs: | |
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: "~1.21.12" | ||
check-latest: true | ||
check-latest: true | ||
|
||
- name: Add Remote | ||
run: | | ||
git remote add subnet-evm https://github.com/ava-labs/subnet-evm | ||
|
||
# TODO: Replace test branch with actual (eg, coreth) | ||
- name: Fetch Remote Branch (${{ github.event.inputs.remoteBranch }}) | ||
id: fetch_remote_branch | ||
run: | | ||
git fetch subnet-evm ${{ github.event.inputs.remoteBranch }} | ||
git fetch subnet-evm coreth-diff-script | ||
result=$(git rev-parse --short=8 subnet-evm/${{ github.event.inputs.remoteBranch }}) | ||
echo result="${result}" >> "${GITHUB_OUTPUT}" | ||
|
||
# TODO: Remove this step when the script is checked in | ||
- name: Checkout script | ||
run: | | ||
git checkout subnet-evm/coreth-diff-script -- ./scripts/apply_diff_and_rename.sh | ||
|
||
- name: Apply diff | ||
run: | | ||
./scripts/apply_diff_and_rename.sh subnet-evm/${{ github.event.inputs.remoteBranch }} | ||
|
||
# TODO: Should this step be removed? | ||
- name: Restore .github/workflows | ||
run: | | ||
Comment on lines
+44
to
+47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAIK it requires a special token if you want to modify a workflow with a workflow |
||
git checkout -- .github/workflows | ||
|
||
# TODO: Using a single branch to iterate for now (avoid maing noise in notifications) | ||
- name: Create Pull Request | ||
id: create_pr | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
commit-message: "Sync subnet-evm to ${{ steps.fetch_remote_branch.outputs.result }}" | ||
branch: auto-sync-subnet-evm | ||
title: "Sync Subnet EVM to ${{ steps.fetch_remote_branch.outputs.result }}" | ||
body: | | ||
This PR was created automatically by a GitHub Action. | ||
draft: true | ||
|
||
- name: PR Outputs | ||
if: ${{ steps.create_pr.outputs.pull-request-number }} | ||
run: | | ||
echo "Pull Request Number - ${{ steps.create_pr.outputs.pull-request-number }}" | ||
echo "Pull Request URL - ${{ steps.create_pr.outputs.pull-request-url }}" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This looks dope. Once upon a time I tried to come up with a similar workflow but ended up needing a special token. I think this script won't require token since it creates the PR in the same repo (coreth). What I had been previously trying to accomplish was:
I'm not saying we should have these, just sharing my previous ideas.