Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
feat: update has_changed_files output
Browse files Browse the repository at this point in the history
  • Loading branch information
wei authored Feb 17, 2021
1 parent 8c53cf0 commit 65194d8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:

### Outputs

The following outputs are available: `pr_url`, `pr_number`, `changed_files ("true"|"false")`.
The following outputs are available: `pr_url`, `pr_number`, `has_changed_files ("true"|"false")`.

```yaml
on:
Expand All @@ -94,8 +94,8 @@ jobs:
run: echo ${{steps.open-pr.outputs.pr_url}}
- name: output-number
run: echo ${{steps.open-pr.outputs.pr_number}}
- name: output-changed-files
run: echo ${{steps.open-pr.outputs.changed_files}}
- name: output-has-changed-files
run: echo ${{steps.open-pr.outputs.has_changed_files}}
```

Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ outputs:
description: 'Pull request URL'
pr_number:
description: 'Pull request number'
changed_files:
description: 'True when there were changed files detected and a PR will be created'
has_changed_files:
description: 'Boolean string indicating whether any file has been changed'
runs:
using: 'docker'
image: 'Dockerfile'
Expand Down
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ echo ${PR_URL}
echo "::set-output name=pr_url::${PR_URL}"
echo "::set-output name=pr_number::${PR_URL##*/}"
if [[ "$LINES_CHANGED" = "0" ]]; then
echo "::set-output name=changed_files::false"
echo "::set-output name=has_changed_files::false"
else
echo "::set-output name=changed_files::true"
echo "::set-output name=has_changed_files::true"
fi

0 comments on commit 65194d8

Please sign in to comment.