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.tokenapprovers- 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
fiSee 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.
<!--START:guestbook-->
<!--END:guestbook-->See guestbook.md for an example guestbook.
Inspired by @JasonEtco's readme-guestbook