This is a pretty massive release! @jcbhmr made a lot of changes to modernize this action and bring it more in-line with other actions. For instance, now we use with:
instead of env:
to pass inputs to the script. We also have dropped rsync! We now use a trick with $GIT_DIR
and $GIT_WORK_TREE
to commit your files without ever copying or moving them! Isn't that cool! 😎 Since we dropped rsync, we no longer need to use Docker! #32 That means you can now use this action on Windows if you're using v4. 👍
We've also made it so that the ${{ github.token }}
will be picked up by default just like all your favorite official github.com/actions Actions!
Migration guide
If you're still using v3, here's a quick guide to transition to using v4. We hope you like the new interface!
- Find all your workflows that use v3. This can be done via a per-user or per-org code search.
- Replace the v3 tag with v4. We'll only introduce breaking changes in major versions. We use semver.
- If you're using
GH_TOKEN: ${{ github.token }}
orGH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
, you can remove it. We now use that token by default if none is provided. If you need to provide a custom PAT, usewith:
and thentoken: ${{ secrets.PAT }}
. - To define the path, we now use the standard
with:
path:
option. You no longer need a trailing slash like you did when we used rsync. 😁 - Our new default commit message is
Update wiki ${{ github.sha }}
. If you want to change this, you can usecommit-message: Hi!
. - If you're setting the commit author, you don't need to do that anymore. We use the @github-actions user to take ownership of the stuff that gets committed. If you really want to change that, you could use the
$GIT_AUTHOR_NAME
and otherGIT_*
env vars. - We now use standard
.gitignore
syntax for ourignore:
input. This used to be a space-separatedEXCLUDED_FILES
list. Make sure you separate your ignore list by newlines! You can use the|
pipe to get a multiline string in YAML. - Commit & make a PR for your changes! 🎉
Here's an example of the transition:
- uses: Andrew-Chen-Wang/github-wiki-action@v2
env:
WIKI_DIR: my-wiki/
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_MAIL: ${{ secrets.YOUR_EMAIL }}
GH_NAME: ${{ github.repository_owner }}
EXCLUDED_FILES: "Special-page.md Hidden.md"
- uses: Andrew-Chen-Wang/github-wiki-action@v4
with:
path: my-wiki
ignore: |
Special-page.md
Hidden.md
🆘 If you have any questions, you can open an Issue or open a Discussion! We'd be happy to help you!
What's Changed
- Upgrade readme by @jcbhmr in #22
- Use raw bash by @jcbhmr in #40
- Add tests by @jcbhmr in #41
- Add
update-tags.yml
workflow by @jcbhmr in #42 - Add note about links on GitHub source view vs GitHub wiki by @jcbhmr in #44
- Add image to readme by @jcbhmr in #47
- Add
github-server-url
option by @jcbhmr in #43 - Add strategy switch by @jcbhmr in #45
- Add GitHub token dev notes by @jcbhmr in #48
- Add quicklinks to top by @jcbhmr in #51
New Contributors
Full Changelog: v3...v4.0.0