Skip to content

Commit

Permalink
try trigger - but it doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
crummy authored Mar 28, 2024
1 parent 420a2c3 commit 65cfd0f
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
on:
push
push:
workflow_call:
inputs:
environment:
type: string
required: true

jobs:
auto-deploy:
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Listens for specific comments in PRs and triggers a build

name: Build Trigger

on: issue_comment

jobs:
building_reaction:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
github.rest.reactions.createForIssueComment({
comment_id: context.payload.comment.id,
content: 'ROCKET'
})
prerelease_deploy:
name: deploy to pre-release
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'deploy to pre-release') }}
uses: ./.github/workflows/build.yml@${{ github.event.pull_request.base.ref }}
secrets: inherit
with:
environment: pre-release
dev_deploy:
name: deploy to dev
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'deploy to dev') }}
uses: ./.github/workflows/build.yml@${{ github.event.pull_request.base.ref }}
secrets: inherit
with:
environment: dev
# Not doing prod-deploy - merge to main first

# respond with a thumbs up
done_prerelease:
runs-on: ubuntu-latest
needs: prerelease_deploy
steps:
- uses: actions/github-script@v7
with:
script: |
github.rest.reactions.createForIssueComment({
comment_id: context.payload.comment.id,
content: '+1'
})
done_dev:
runs-on: ubuntu-latest
needs: dev_deploy
steps:
- uses: actions/github-script@v7
with:
script: |
github.rest.reactions.createForIssueComment({
comment_id: context.payload.comment.id,
content: '+1'
})

0 comments on commit 65cfd0f

Please sign in to comment.