Skip to content

Commit

Permalink
Merge pull request #976 from peter-evans/output-sha
Browse files Browse the repository at this point in the history
feat: add output for head sha
  • Loading branch information
peter-evans committed Nov 4, 2021
2 parents 3c3d696 + c0a9598 commit a6c8b38
Show file tree
Hide file tree
Showing 4 changed files with 393 additions and 1,154 deletions.
6 changes: 1 addition & 5 deletions README.md
Expand Up @@ -79,6 +79,7 @@ The following outputs can be used by subsequent workflow steps.
- `pull-request-number` - The pull request number.
- `pull-request-url` - The URL of the pull request.
- `pull-request-operation` - The pull request operation performed by the action, `created`, `updated` or `closed`.
- `pull-request-head-sha` - The commit SHA of the pull request branch.

Step outputs can be accessed as in the following example.
Note that in order to read the step outputs the action step must have an id.
Expand Down Expand Up @@ -215,11 +216,6 @@ jobs:
maintainers
milestone: 1
draft: false

- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
```

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

0 comments on commit a6c8b38

Please sign in to comment.