Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add support for any_deleted and only_deleted boolean output. #166

Closed
1 task done
jackton1 opened this issue Aug 25, 2021 · 0 comments · Fixed by #188
Closed
1 task done

[Feature] Add support for any_deleted and only_deleted boolean output. #166

jackton1 opened this issue Aug 25, 2021 · 0 comments · Fixed by #188
Labels
enhancement New feature or request

Comments

@jackton1
Copy link
Member

jackton1 commented Aug 25, 2021

Is your feature request related to a problem? Please describe.

The current changed file detection via only_deleted and any_deleted doesn't include deleted files which makes it tough to detect files that were deleted.

Describe the solution you'd like?

Proposes Solution

Adding two new boolean outputs should help with detecting file deletion.

      - name: Run step when any listed file has been deleted
        if: steps.changed-files.outputs.any_deleted == "true"
        run: |
          for file in "${{ steps.changed-files.outputs.deleted_files }}"; do
            echo "$file was deleted"
          done

      - name: Run step when all listed files have been deleted
        if: steps.changed-files.outputs.only_deleted == "true"
        run: |
          for file in "${{ steps.changed-files.outputs.deleted_files }}"; do
            echo "$file was deleted"
          done

Describe alternatives you've considered?

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jackton1 jackton1 added the enhancement New feature or request label Aug 25, 2021
@jackton1 jackton1 changed the title [Feature] Add support for any_deleted_files and all_deleted_files boolean output. [Feature] Add support for any_deleted and only_deleted boolean output. Sep 5, 2021
@jackton1 jackton1 linked a pull request Sep 5, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant