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

Clean up the managed directories to avoid external side effect influence #15

Closed
wants to merge 5 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,13 @@ runs:
echo ::group::Move "'${{ steps.collection-metadata.outputs.fqcn }}'"
collection to ${{ steps.collection-metadata.outputs.checkout-path }}...
shell: bash
- name: Install ansible-core (${{ inputs.ansible-core-version }})
- name: Move collection to test directory
exp-hc marked this conversation as resolved.
Show resolved Hide resolved
run: >-
set -x
;
rm -rf
"${{ steps.collection-metadata.outputs.checkout-path }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should:

  1. Clean up the whole directory structure we manage to prevent any further side effects.
  2. Do (1) as the very first step in this action, before the checkout.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moreover, I'd probably clean up both dirs, I think. Maybe the whole collections dir too.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense, I've implemented the change per your suggestion.

;
mkdir -pv
"${{ steps.collection-metadata.outputs.collection-namespace-path }}"
;
Expand Down