Skip to content

Commit

Permalink
Merge pull request #12 from Dafnik/fix/has-changes
Browse files Browse the repository at this point in the history
fix: invert has-changes
  • Loading branch information
Dafnik committed Feb 1, 2024
2 parents 0e007b6 + 357c323 commit e24eb1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
# output-format: 'json'

- name: create new pull request if needed
if: steps.license-report.outputs.has-changes == 'true'
if: steps.license-report.outputs.has-no-changes != 'true'
uses: peter-evans/create-pull-request@v5
with:
title: Generated new licenses report
Expand Down Expand Up @@ -69,11 +69,11 @@ Furthermore, see [action.yml](action.yml)

### Outputs

| Outputs | Description |
|---------------|-------------------------------------------------------------------------------------|
| `has-changes` | Flag to indicate if there are changes in the licenses file. |
| `diff` | Differences between old and new license report in `markdown`. |
| `licenses` | License report as `string` in your chosen `output-format`. <br> Is always returned. |
| Outputs | Description |
|------------------|-------------------------------------------------------------------------------------|
| `has-no-changes` | Flag to indicate if there are no changes in the licenses file. |
| `diff` | Differences between old and new license report in `markdown`. |
| `licenses` | License report as `string` in your chosen `output-format`. <br> Is always returned. |

## Building

Expand Down
5 changes: 3 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ runs:
- name: Delete new file if not needed
if: steps.diff-check.outputs.passed == 'true'
shell: bash
run: rm ${{ inputs.license-report-path }}.new
run: |
rm ${{ inputs.license-report-path }}.new
- name: output licenses
id: output
Expand All @@ -75,7 +76,7 @@ runs:
echo "$delimiter" >> "${GITHUB_OUTPUT}"
outputs:
has-changes:
has-no-changes:
description: Flag to indicate if there are changes in the licenses file.
value: ${{ steps.diff-check.outputs.passed }}
diff:
Expand Down

0 comments on commit e24eb1c

Please sign in to comment.