Send greetings to your contributors, e.g. when an issue is created:
Credits: Based on one of Peter Evans' fantastic Github Actions contributions:
Create or Update Comment
Location: .github/comment-template.md
Howdy 🖐 {{ .author }} ! Thank you for your interest in this project. We value your feedback and will respond soon.Location: .github/workflows/issue-comment.yaml
name: Greeting
on:
issues:
# only run when issue is created
types: ["opened"]
jobs:
greeting:
name: Create Issue Greeting
runs-on: ubuntu-latest
# only send message to first-time contributors
# https://docs.github.com/en/graphql/reference/enums#commentauthorassociation
if: github.event.issue.author_association == 'NONE'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Render template
id: template
uses: chuhlomin/render-template@v1.2
with:
template: .github/comment-template.md
vars: |
author: ${{ github.actor }}
- name: Create comment
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ github.event.issue.number }}
body: ${{ steps.template.outputs.result }}