Skip to content
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

auto-update documented version for external projects #1169

Merged
merged 7 commits into from
Jun 6, 2022

Conversation

laurentsenta
Copy link
Contributor

@laurentsenta laurentsenta commented Jun 6, 2022

Fixes #1128

  • Re-use the documentation generation we used for go-ipfs with ipfs-udate and ipfs-cluster,
  • Remove the concept of tags when creating PR, etc (because we're not tied to a single go-ipfs version anymore),
  • Make the workflow callable.

Todo

  • add version bump for ipfs-cluster and ipfs-update
  • update image to use jq
  • rename and re-organize the workflow for clarity
  • tweak the action so it always uses the same branch
  • test base case (updating missing version, etc).
  • test the complex case (actual IPFS update) still works
  • check the content of the latest repo-sync/pull-request

@laurentsenta laurentsenta marked this pull request as draft June 6, 2022 14:00
@laurentsenta laurentsenta force-pushed the feat/fix-1128-auto-update-projects branch 2 times, most recently from 3dca688 to 1a27477 Compare June 6, 2022 14:10
@laurentsenta
Copy link
Contributor Author

laurentsenta commented Jun 6, 2022

Testing:

Testing with old code:

@laurentsenta laurentsenta force-pushed the feat/fix-1128-auto-update-projects branch from 1a27477 to ca6396b Compare June 6, 2022 14:30
go install ./cmd/ipfs
cd $ROOT/docs/reference
./generate-cli-docs.sh
fi
Copy link
Contributor Author

@laurentsenta laurentsenta Jun 6, 2022

Choose a reason for hiding this comment

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

Note: github doesn't detect the move so it looks like I created the whole file. This PR really "just" move the update version code lower and calls it thrice.

  • We also push to a unique branch on file changes, instead of something like new-documentation-${NEW_TAG} because documentation updates are not only tied to go-ipfs versions anymore.

  • I was thinking about extracting the version replace script to its own action, but I'm under the impression that would make the code more complex (spread it around 3 actions instead of a single script file).

uses: repo-sync/pull-request@65194d8015be7624d231796ddee1cd52a5023cb3 #v2.16
if: ${{ steps.update.outputs.updated_branch }}
- name: pull-request
uses: repo-sync/pull-request@65785d95a5a466e46a9d0708933a3bd51bbf9dde #v2.6.2
Copy link
Contributor Author

@laurentsenta laurentsenta Jun 6, 2022

Choose a reason for hiding this comment

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

I started seeing a workspace error (https://github.com/laurentsenta/ipfs-docs/runs/6756806053?check_suite_focus=true) in my github action, had to update. I think the previous version was a typo (2.6.1, not 16)

Diff: repo-sync/pull-request@65194d8...65785d9

@laurentsenta laurentsenta force-pushed the feat/fix-1128-auto-update-projects branch from ca6396b to f318871 Compare June 6, 2022 14:55
@laurentsenta laurentsenta force-pushed the feat/fix-1128-auto-update-projects branch from f318871 to efac06e Compare June 6, 2022 15:00
@laurentsenta laurentsenta marked this pull request as ready for review June 6, 2022 15:01
@filecorgi
Copy link
Contributor

  • Image optimization came back clean!
  • Vuepress build was successful!

Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Thank you @laurentsenta ❤️

LGTM (/releases/latest skips release candidates, and only shows final releases, which is what we want).

Let's merge this (if there are any issues, we can improve in follow-up PR)

@lidel lidel merged commit b35ff37 into main Jun 6, 2022
@lidel lidel deleted the feat/fix-1128-auto-update-projects branch June 6, 2022 19:13
Comment on lines +65 to +67
update_version ipfs/ipfs-update current-ipfs-updater-version
update_version ipfs/ipfs-cluster current-ipfs-cluster-version
update_version ipfs/go-ipfs current-ipfs-version
Copy link
Member

Choose a reason for hiding this comment

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

@johnnymatthews for now we track updates of these three, but if we ever add more projects, we can add them here with ease (as long they are on github and publish releases there)

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.

Create automation script to update project version numbers across repos.
3 participants