Skip to content

Commit

Permalink
fake
Browse files Browse the repository at this point in the history
  • Loading branch information
sprutton1 committed Dec 9, 2024
1 parent ac2d13f commit e3a80f0
Showing 1 changed file with 29 additions and 10 deletions.
39 changes: 29 additions & 10 deletions .github/workflows/try.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,57 @@ name: Try Build
on:
issue_comment:
types: [created, edited, deleted]
push:
branches:
- fix_try

permissions:
contents: read
issues: write
pull-requests: read
pull-requests: write

jobs:
try:
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/try') }}
# if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/try') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: Get Pull Request Number
id: pr
run: echo "pull_request_number=$(gh pr view --json number -q .number || echo "")" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: peter-evans/create-or-update-comment@v4
id: init-comment
with:
issue-number: ${{ github.event.pull_request.number }}
# issue-number: ${{ github.event.pull_request.number }}
issue-number: ${{ steps.pr.outputs.pull_request_number }}
body: |
'Okay, starting a try! I\'ll comment again once the build starts...'
Okay, starting a try! I\'ll comment again once the build starts...
- uses: xt0rted/pull-request-comment-branch@v2
id: comment-branch
# - uses: xt0rted/pull-request-comment-branch@v2
# id: comment-branch

- uses: "buildkite/trigger-pipeline-action@v2.1.0"
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 }}"
# branch: ${{ steps.comment-branch.outputs.head_ref }}
# message: ":github: Try for branch ${{ steps.comment-branch.outputs.head_ref }}"
branch: $GITHUB_REF
message: ":github: Try for branch $GITHUB_REF"
ignore_pipeline_branch_filter: true
send_pull_request: true

- uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
# issue-number: ${{ github.event.pull_request.number }}
issue-number: ${{ steps.pr.outputs.pull_request_number }}
comment-id: ${{ steps.init-comment.outputs.comment-id }}
body: |
`πŸš€ [Try running here](${{ steps.run-build.outputs.url }}! πŸš€`
πŸš€ [Try running here](${{ steps.run-build.outputs.url }})! πŸš€

0 comments on commit e3a80f0

Please sign in to comment.