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

Does the action ensure that the container is deleted once work is completed? #6

Open
sid-harjeet opened this issue Apr 7, 2023 · 2 comments

Comments

@sid-harjeet
Copy link

Thank you for creating this action. Given that Windows runners are not ephemeral, this action will help in keeping the runners clean as all action will happen inside the containers.

Suggestion - It would help if as a last implicit step, the action also destroys the container automatically.

@edwardvandevorst-philips
Copy link
Collaborator

Yeah, that would be a nice addition as an extra option.

@edwardvandevorst-philips
Copy link
Collaborator

@sid-harjeet if you add '--rm' for the extra_args, would that not solve this issue?
For example

      - name: Test_Run
        uses: philips-software/run-windows-docker-container-action@<version>
        with:
          image: mcr.microsoft.com/windows/servercore:20H2
          entrypoint: powershell.exe
          extra_args: '--rm' # removes container after this run
          run: >-
            echo "Hello world";
            ./run-test-script.ps1;

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

No branches or pull requests

2 participants