Skip to content

Instantly share code, notes, and snippets.

@developer-guy
Forked from weibeld/02-issue-greeter.yml
Created November 27, 2020 07:50
Show Gist options
  • Save developer-guy/b5b7c2c32a8dcf035f4b983b4e751c97 to your computer and use it in GitHub Desktop.
Save developer-guy/b5b7c2c32a8dcf035f4b983b4e751c97 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