New repo: The Silver Bayonet (Osprey) #357
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: New repo issue | |
on: | |
issues: | |
types: [opened, edited] | |
jobs: | |
handle_new: | |
runs-on: ubuntu-latest | |
if: | | |
github.event.issue.state == 'open' && | |
startsWith(github.event.issue.title, 'New Repo') | |
steps: | |
- name: Add 'new repo' label | |
if: "!contains(github.event.issue.labels.*.name, 'new repo')" | |
uses: actions/github-script@v3 | |
with: | |
script: | | |
await github.issues.addLabels({ | |
...context.repo, | |
issue_number: context.issue.number, | |
labels: ['new repo'] | |
}) | |
- uses: actions/checkout@v2 | |
- name: Run preview comment creation script | |
id: create_script | |
uses: Amadevus/pwsh-script@v2 | |
with: | |
script: ./.github/scripts/GetPreviewComment.ps1 $github.event | |
- name: Create comment with preview info | |
uses: peter-evans/create-or-update-comment@v1 | |
with: | |
issue-number: ${{ github.event.issue.number }} | |
body: ${{ steps.create_script.outputs.result }} |