Replies: 9 comments
-
There's some more discussion about this in https://github.com/jcbhmr/publish-wiki-action/issues/8#issuecomment-1461135510 |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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) |
Beta Was this translation helpful? Give feedback.
-
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
|
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
i've decided to rescind my suggestion of this idea: this isn't a worthwhile pursuit since the benefit of having history in the wiki is very low vs the difficulty of actually commiting everything to git before publishing to the wiki. |
Beta Was this translation helpful? Give feedback.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions