trigger workflow 12 #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: add comment on issue | |
on: | |
pull_request: | |
issues: | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
comment_issue: | |
if: contains( github.event.issue.labels.*.name, 'bug') | |
permissions: | |
issues: write | |
name: comment-issue-job | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: create a comment with git cli | |
run: | | |
gh issue comment ${{ github.event.issue.number }} --body "This is my test comment created with a workflow using github cli" | |
- name: create a comment with github action | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: 'created a comment using github action!' | |
}) |