Skip to content

Commit

Permalink
feat: add output for head sha
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-evans committed Nov 4, 2021
1 parent 3c3d696 commit c0a9598
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 c0a9598

Please sign in to comment.