Skip to content

Commit

Permalink
bigger test
Browse files Browse the repository at this point in the history
  • Loading branch information
ianrose14 committed Oct 4, 2023
1 parent 691a887 commit 0054908
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/comment-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,37 @@ jobs:
runs-on: ubuntu-latest
steps:
- run: echo 'hi there' && echo ${{ github.event.comment.body }}

on-branch:
name: Branch Test
runs-on: ubuntu-latest
steps:
- name: Get PR branch
uses: xt0rted/pull-request-comment-branch@v1
id: comment-branch

- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}

- run: echo my head ref is ${{ steps.comment-branch.outputs.head_ref }}

- run: cat robots.txt

- name: Add comment to PR
uses: actions/github-script@v6
if: always()
with:
script: |
const name = '${{ github.workflow }}';
const url = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}';
const success = '${{ job.status }}' === 'success';
const body = `${name}: ${success ? 'succeeded ✅' : 'failed ❌'}\n${url}`;
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
})

0 comments on commit 0054908

Please sign in to comment.