Skip to content

Commit a6c8b38

Browse files
authored
Merge pull request #976 from peter-evans/output-sha
feat: add output for head sha
2 parents 3c3d696 + c0a9598 commit a6c8b38

File tree

4 files changed

+393
-1154
lines changed

4 files changed

+393
-1154
lines changed

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ The following outputs can be used by subsequent workflow steps.
7979
- `pull-request-number` - The pull request number.
8080
- `pull-request-url` - The URL of the pull request.
8181
- `pull-request-operation` - The pull request operation performed by the action, `created`, `updated` or `closed`.
82+
- `pull-request-head-sha` - The commit SHA of the pull request branch.
8283

8384
Step outputs can be accessed as in the following example.
8485
Note that in order to read the step outputs the action step must have an id.
@@ -215,11 +216,6 @@ jobs:
215216
maintainers
216217
milestone: 1
217218
draft: false
218-
219-
- name: Check outputs
220-
run: |
221-
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
222-
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
223219
```
224220

225221
An example based on the above reference configuration creates pull requests that look like this:

0 commit comments

Comments
 (0)