feat(ci): GitHub Action for updating IC replica#2377
Merged
smallstepman merged 15 commits intomasterfrom Jul 26, 2022
Merged
Conversation
added 2 commits
July 26, 2022 17:49
|
Cool! Can you update https://github.com/dfinity/sdk/blob/master/.github/CONTRIBUTING.adoc#updating-the-replica with instructions on how to kick off the workflow, an appropriate github URL, that sort of thing? |
Contributor
Author
|
sure, done! heads up: the link in CONTRIBUTING.adoc will remain broken until this gets merged |
ghost
reviewed
Jul 26, 2022
ghost
reviewed
Jul 26, 2022
ghost
approved these changes
Jul 26, 2022
ghost
left a comment
There was a problem hiding this comment.
Just a couple typos left. Looks great!
Co-authored-by: Eric Swanson <64809312+ericswanson-dfinity@users.noreply.github.com>
Co-authored-by: Eric Swanson <64809312+ericswanson-dfinity@users.noreply.github.com>
Contributor
Author
|
thanks! |
3 tasks
mergify bot
pushed a commit
that referenced
this pull request
Jul 27, 2022
…n GHA workflow (#2380) # Description Use https://github.com/dfinity-bot to create the PR produced by `.github/workflows/update-replica-version.yml` workflow. This will help avoid asking GitHub Bot to sign CLA (example #2379). Fixes/continuation of: #2377 # How Has This Been Tested? forked and tested there # Checklist: - [x] The title of this PR complies with [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). - [ ] I have edited the CHANGELOG accordingly. - [ ] I have made corresponding changes to the documentation.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Workflow for updating IC replica. The workflow produces a PR that has to be reviewed. The PR contains the text which needs to be inserted into the changelog manually (also provides the link to edit the changelog file directly on the branch of created PR).
Example of the workflow run output: https://github.com/smallstepman/sdk/runs/7522842430
Example of the PR created by the workflow: https://github.com/smallstepman/sdk/pull/39
The list of links to proposals is generated based on replica version sha used in the latest GitHub Release (not draft or prerelease). Currently, the workflow searches for

replica version used: ([a-f0-9]+), for example:We would need to add this.
The workflow has to be run manually. GitHub Actions have a nice UI to input all necessary variables.

latestis selected, the replica version is fetched from https://ic-api.internetcomputer.org/api/v3/subnet-replica-versions?limit=50&offset=0customis selected, the SHA has to be provided manuallyThe workflow at its core still uses Nix and niv and
scripts/update-replica.sh, though small tweaks to the scripts were necessary.New dependency: GitHub Action step which installs Nix (pinned to the commit of the latest release).
The workflow configures the author/committer/user in git client in a way, that creates pretty looking git commits

background: I struggled to install nix on my system due to errors, therefore decided to build a workflow for the part of CI which requires Nix. I'd love to use this workflow as a starting point for automating other chores, like updating motoko or ic-ref versions.
How Has This Been Tested?
Ran many times on fork repo.
Checklist: