name: Greetings

on:
  # Runs in the context of the target (containrrr/watchtower) repository, and as such has access to GITHUB_TOKEN
  pull_request_target:
    types: [opened]
  issues:
    types: [opened]

jobs:
  greeting:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/first-interaction@v1
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        issue-message: >
          Hi there! 👋🏼
          As you're new to this repo, we'd like to suggest that you read our [code of conduct](https://github.com/containrrr/.github/blob/master/CODE_OF_CONDUCT.md)
          as well as our [contribution guidelines](https://github.com/containrrr/watchtower/blob/master/CONTRIBUTING.md).
          Thanks a bunch for opening your first issue! 🙏
        pr-message: >
          Congratulations on opening your first pull request! We'll get back to you as soon as possible. In the meantime, please make sure you've updated the documentation to reflect your changes and have added test automation as needed. Thanks! 🙏🏼
