-
Notifications
You must be signed in to change notification settings - Fork 12
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Consider using git subtree #18
Comments
There's some more discussion about this in https://github.com/jcbhmr/publish-wiki-action/issues/8#issuecomment-1461135510 |
Thanks for the possible addition.
So we wouldn't be able to push ourselves?
Happy to take a look at your PR. I don't think we'll want to add this as the main feature, and so having some experimental flag on would be nice to avoid breaking changes. |
What I mean by this is that right now you can: - run: echo "Blaaaaaaaaahhhhh" > wiki/CHANGELOG.md
- uses: Andrew-Chen-Wang/github-wiki-action@main Note that we don't have to commit the git repo since you use rsync. It takes the current state not the latest commit state. If you used git subtree, you'd need to commit to get it to push: - run: echo "Blaaaaaaaaahhhhh" > wiki/CHANGELOG.md
- run: git add -A && git commit -am "[bot] Add changelog"
# Now that we've committed, the git subtree command works on the latest commit
- uses: Andrew-Chen-Wang/github-wiki-action@dev |
Hm I haven't encountered a case where someone changes inside the CI itself; most of the time, the change happens outside, so a commit wouldn't be necessary. In other words, the GitHub action itself is the only thing needed, so it doesn't seem like a breaking change necessarily. Though functionality would for sure be different, and private repositories may have something funky. I think having this as an experimental flag or a flag denoting "save commits" would be great. Also read you were looking to merge your action inside another repo, and so happy to have you co maintain this one (my startup has been diluting my oss time anyway) |
This has been my experience too. Especially for wiki publishing, the content is already in git so there's no need to fuss with working dir vs latest commit state.
How does this look for a (theoretical) options table for a v4? Speaking of versioning, I thought this was cool: https://github.com/actions/publish-action. they already have a few beta releases https://github.com/actions/publish-action/tags and it seems to be used in some actions already https://github.com/actions/configure-pages/blob/main/.github/workflows/release.yml#L27 Anyways, the theoretical options table. All these names are taken from the official github actions for inspiration
for v4 and beyond I honestly think only those three options are required. If you want to keep the commit stuff, then that could be duplicated name-wise from https://github.com/stefanzweifel/git-auto-commit-action/blob/master/action.yml which has all the infra that you could literally just pass as-is using a composite action It'd also be nice to have an output of the wiki's name like wiki_url or page_url kinda like https://github.com/actions/deploy-pages/blob/main/action.yml#L42 that's set to https://github.com/Andrew-Chen-Wang/github-wiki-action/wiki just for feature parity with the similar deploy-pages official action.
Yeah I had my simple three-line action that I didn't really want to create another one in the ecosystem where there's already like 10 actions that do basically almost the same thing https://github.com/jcbhmr/publish-wiki-action/issues/8, and no clear "recommended" one. This (Andrew-Chen-Wang/github-wiki-action) seems like the most popular one. Comparison of popular github wiki actions: https://github.com/jcbhmr/publish-wiki-action/issues/7
|
I wouldn't mind splitting out functionality for newer versions, but SemVer is not properly followed for many GitHub Actions, so maintaining backwards compatibility is a necessity, even as we continue to upgrade by major version. However, do note that new users who see an example of the usage of subtree (i.e. most people will copy example actions code in the README) will have this new feature turned on automatically. |
Hmmm... I have had different experiences. Most actions always have explicit v1 or vN tags, especially in the examples that people copy paste. All of the https://github.com/actions do this, as do all of the https://github.com/wow-actions. In fact, you can't just do 🔬👨🔬 I think this needed more investigation and research before we define a path forward. Cause, yeah, I have seen some that do |
I don't think this is the case! 🎉 It looks like literally 0 people use From the first and last page (hopefully a representative sample): Number that use "v3" as a tag: 23 In fact, what was most interesting is that there are still a lot of users using v2. 🤷♂️ source of this: #23 (reply in thread) Here's an in-ecosystem example of a GitHub Action with v9 already (that's a lot of breaking changes!) https://github.com/EndBug/add-and-commit/releases |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Even if this idea is ultimately veto-ed, I think its worth bringing up the suggestion.
This would...
Note that 2 is likely a downside, but could be mitigated; you can either force the user to use a commit action or
git add CHANGELOG.md && git commit -am "Create changelog"
themselves, or automagically run git commit in the action itself.This would be quite a large breaking change and would warrant a major version bump to v4 (currently v3). If you wanted to make this an opt-in feature, you could add a bool true/false input like
use-subtree: true
to use this.I'm open to contributing code to do this.
The text was updated successfully, but these errors were encountered: