Skip to content

Commit

Permalink
chore: comment on the PR when a try is run
Browse files Browse the repository at this point in the history
  • Loading branch information
sprutton1 committed Dec 3, 2024
1 parent ba8abd0 commit 99dd375
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/try.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,32 @@ jobs:
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/try') }}
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Okay, starting a try! I'll post anther comment once it starts..."
})
- uses: xt0rted/pull-request-comment-branch@v2
id: comment-branch
- uses: "buildkite/[email protected]"
id: run-build
with:
buildkite_api_access_token: ${{ secrets.BUILDKITE_TOKEN }} # TODO(johnrwatson): This is Scott's Token at the minute, needs rotated
pipeline: "system-initiative/si-merge-queue"
branch: ${{ steps.comment-branch.outputs.head_ref }}
message: ":github: Try for branch ${{ steps.comment-branch.outputs.head_ref }}"
ignore_pipeline_branch_filter: true
send_pull_request: true
- uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "🚀 [Try running here](${{ steps.run-build.outputs.url }})! 🚀 "
})

0 comments on commit 99dd375

Please sign in to comment.