philips-software/run-windows-docker-container-action

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

Opened this issue · 2 comments

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.

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

@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;