Skip to content

Comments

feat(ci): GitHub Action for updating IC replica#2377

Merged
smallstepman merged 15 commits intomasterfrom
ci-gha-update-replica-version
Jul 26, 2022
Merged

feat(ci): GitHub Action for updating IC replica#2377
smallstepman merged 15 commits intomasterfrom
ci-gha-update-replica-version

Conversation

@smallstepman
Copy link
Contributor

@smallstepman smallstepman commented Jul 26, 2022

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:
image
We would need to add this.


The workflow has to be run manually. GitHub Actions have a nice UI to input all necessary variables.
image


The 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
image


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:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@smallstepman smallstepman requested a review from a team as a code owner July 26, 2022 15:27
@smallstepman smallstepman requested a review from a user July 26, 2022 15:29
@ghost
Copy link

ghost commented Jul 26, 2022

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?

@smallstepman
Copy link
Contributor Author

sure, done! heads up: the link in CONTRIBUTING.adoc will remain broken until this gets merged

@smallstepman smallstepman enabled auto-merge (squash) July 26, 2022 16:59
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple typos left. Looks great!

@ghost ghost disabled auto-merge July 26, 2022 17:20
Marcin Nowak-Liebiediew and others added 2 commits July 26, 2022 19:38
Co-authored-by: Eric Swanson <64809312+ericswanson-dfinity@users.noreply.github.com>
Co-authored-by: Eric Swanson <64809312+ericswanson-dfinity@users.noreply.github.com>
@smallstepman smallstepman enabled auto-merge (squash) July 26, 2022 17:39
@smallstepman
Copy link
Contributor Author

thanks!

@smallstepman smallstepman merged commit 81c4ec3 into master Jul 26, 2022
@smallstepman smallstepman deleted the ci-gha-update-replica-version branch July 26, 2022 21:24
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant