Skip to content

Instantly share code, notes, and snippets.

@weibeld
Last active November 27, 2020 07:50
Show Gist options
  • Save weibeld/7a59df2b4482aa7b44e46b61c474feb8 to your computer and use it in GitHub Desktop.
Save weibeld/7a59df2b4482aa7b44e46b61c474feb8 to your computer and use it in GitHub Desktop.
GitHub Actions example workflow 2 — Issue Greeter
name: issue-greeter
on:
issues:
types: [opened]
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: my-step
env:
REPO: ${{ github.event.repository.name }}
OWNER: ${{ github.event.repository.owner.login }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
run: |
curl -s -X POST https://api.github.com/repos/$OWNER/$REPO/issues/$ISSUE_NUMBER/comments \
-d '{"body":"Hello ${{ github.event.issue.user.login }}, thanks for your issue!"}'
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment