GitHub Action
The Guestbook
An Action π¬ to create a Guestbook πβ in your Repository π
Create a workflow .yml
file in your repositories .github/workflows
directory. An example workflow is available below. For more information, reference the GitHub Help Documentation for Creating a workflow file.
Create an issue in your repository. Any comment in this issue approved (:+1:) by an authorized user will be added to the guestbook. See #1 for an example issue.
issue
- The issue number to retrieve guestbook entries (required)token
- Authorization token used to interact with the repository and update the guestbook. Defaults togithub.token
approvers
- List of users allowed to approve comments for the guestbookguestbook-path
- File path of the guestbook
steps:
- uses: actions/checkout@v2
- uses: joshmgross/guestbook@main
with:
issue: 1
approvers: |
joshmgross
- name: Update guestbook
run: |
if [[ `git status --porcelain` ]]; then
git config --local user.email "[email protected]"
git config --local user.name "${{ github.actor }}"
git add README.md
git commit -m "β Update guestbook"
git push
fi
See main.yml for a full workflow file example.
In your guestbook markdown file, add comments to denote the start and end of the guestbook. Everything within these comments will be replaced by approved comments from the issue specified.
[@joshmgross](https://github.com/joshmgross) said:
> Hello, this is an informative and useful comment illustrating my thoughts. π§
<sup>[src](https://github.com/joshmgross/guestbook/issues/1#issuecomment-645117859)</sup>
This guestbook is populated by approved π comments in #1.
@joshmgross said:
Hello, this is an informative and useful comment illustrating my thoughts. π§ src
Inspired by @JasonEtco's readme-guestbook