github.com/vmware/govmomi@v0.43.0/.github/workflows/issue-greeting.yaml (about)

     1  #  Copyright (c) 2021 VMware, Inc. All Rights Reserved.
     2  #
     3  #  Licensed under the Apache License, Version 2.0 (the "License");
     4  #  you may not use this file except in compliance with the License.
     5  #  You may obtain a copy of the License at
     6  #
     7  #  http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  #  Unless required by applicable law or agreed to in writing, software
    10  #  distributed under the License is distributed on an "AS IS" BASIS,
    11  #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  #  See the License for the specific language governing permissions and
    13  #  limitations under the License.
    14  
    15  name: Greeting
    16  
    17  on:
    18    issues:
    19      types: ["opened"]
    20  
    21  jobs:
    22    greeting:
    23      name: Send Greeting
    24      runs-on: ubuntu-20.04
    25      # only send message to users not (yet) associated with repo
    26      # https://docs.github.com/en/graphql/reference/enums#commentauthorassociation
    27      if: github.event.issue.author_association == 'NONE'
    28  
    29      steps:
    30        - name: Checkout
    31          uses: actions/checkout@v4
    32          with:
    33            fetch-depth: 1
    34  
    35        - name: Render template
    36          id: template
    37          uses: chuhlomin/render-template@v1.10
    38          with:
    39            template: .github/comment-template.md
    40            vars: |
    41              author: ${{ github.actor }}
    42  
    43        - name: Create comment
    44          uses: peter-evans/create-or-update-comment@v4
    45          with:
    46            issue-number: ${{ github.event.issue.number }}
    47            body: ${{ steps.template.outputs.result }}