Skip to content

Commit

Permalink
Merge pull request #83 from sonomirco/dev/mibi/comment-trigger
Browse files Browse the repository at this point in the history
Comment trigger
  • Loading branch information
sonomirco authored Sep 14, 2023
2 parents e72c97a + b717c21 commit 4fa3e85
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/trigger-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Trigger by the commit

on:
issue_comment:
types: [created]

jobs:
deploy:
if: github.event.issue.pull_request && contains(github.event.comment.body, '/deploy')
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v3
with:
ref: ${{ github.event.issue.pull_request.head.sha }}

- uses: actions/github-script@v6
with:
script: |
github.rest.issues.updateComment({
comment_id: context.comment.id,
owner: context.repo.owner,
repo: context.repo.repo,
body: '${{ github.event.issue.body }} 👋 Thanks for reporting!'
})
- name: Deploy
run: |
echo "Deploying..."
- name: 🚧 Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x

- name: 🔧 Restore nuget with dotnet
run: dotnet restore ${{ env.PROJECT_PATH }}

0 comments on commit 4fa3e85

Please sign in to comment.