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

Fixed action failure when the .distignore file is not present in repo. #137

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

iamdharmesh
Copy link
Member

Description of the Change

As reported in #136, the action(version 2.2.1) fails when the .distignore file is not present in the repo.

This issue was introduced in #130. #130 added support for including build files in SVN when the action is used without a BUILD_DIR and .distignore file. In order to achieve this, the git commit command was added without checking if there were any untracked files to add and commit. Running git commit on a clean working tree results in a failure with the message (nothing to commit, working tree clean).

This PR fixes the issue by adding a condition for untracked files check and only running git commit if untracked files are present.

Closes #136

How to test the Change

  1. Fork "Eight Day Week"
  2. Update the deploy plugin workflow to use action from this fix branch and update workflow to run in a dry-run
  3. Create a new release on repo. (It will trigger the deploy action)
  4. Verify the deploy action, it should run successfully without any failure.

The test I have done on the sample repo: https://github.com/iamdharmesh/GlotPress/actions/runs/6109282764/job/16579976180

Changelog Entry

Fixed - Action failure when the .distignore file is not present in repo.

Credits

Props @iamdharmesh @dkotter

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@iamdharmesh iamdharmesh requested a review from a team as a code owner September 7, 2023 12:06
@iamdharmesh iamdharmesh self-assigned this Sep 7, 2023
@iamdharmesh iamdharmesh requested review from dkotter and removed request for a team September 7, 2023 12:06
@iamdharmesh iamdharmesh added this to the 2.2.2 milestone Sep 7, 2023
@dkotter dkotter merged commit f65ddb3 into develop Sep 7, 2023
@dkotter dkotter deleted the fix/136 branch September 7, 2023 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Action fails when the .distignore file is not present.
2 participants