Created
December 5, 2019 15:27
-
-
Save JJ/3398f604beca119e8f8d23d8abbd35ed to your computer and use it in GitHub Desktop.
GitHub action that uses Perl in Windows with Powershell. This creates a comment when certain words are mentioned in an issue.
This file contains hidden or 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: "We 🎔 Perl" | |
on: | |
issues: | |
types: [opened, edited, milestoned] | |
jobs: | |
seasonal_greetings: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2-beta | |
- name: Maybe greet | |
id: maybe-greet | |
env: | |
HEY: "Hey you!" | |
GREETING: "Merry Xmas to you too!" | |
BODY: ${{ github.event.issue.body }} | |
TOKEN: ${{ secrets.GITHUB_TOKEN}} | |
ISSUE: ${{ github.event.issue.number }} | |
run: | | |
$output=(perl utils/printenv.pl) | |
$body= @{ 'body'= $output } | ConvertTo-Json | |
$header= @{ | |
'Authorization'="token $ENV:TOKEN" | |
} | |
Invoke-RestMethod -Uri "https://api.github.com/repos/JJ/raku-advent-calendar-article-2019/issues/$ENV:ISSUE/comments" -Method 'Post' -Body $body -Headers $header |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment