Skip to content

Commit

Permalink
test head_sha
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-evans committed Jun 19, 2020
1 parent 0b99e67 commit b078c36
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI
on:
push:
branches: [master]
branches: [master, pr-comment]
paths-ignore:
- 'README.md'
- 'docs/**'
Expand Down Expand Up @@ -31,13 +31,6 @@ jobs:
with:
name: action.yml
path: action.yml
- id: vars
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then \
echo "::set-output name=sha::${{ github.event.pull_request.head.sha }}"; \
else \
echo "::set-output name=sha::${{ github.sha }}"; \
fi

test:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
Expand All @@ -62,7 +55,7 @@ jobs:
- name: Test create commit comment
uses: ./
with:
sha: ${{ needs.build.outputs.sha }}
sha: ${{ github.head_sha }}
body: |
This is a multi-line test comment
- With GitHub **Markdown**
Expand Down

2 comments on commit b078c36

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a multi-line test comment

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a multi-line test comment

Please sign in to comment.