During workflow execution, I produce several artifacts but after a successful build I no longer need them and I want to clean that up as I only need them temporarily.
- name: Make artifact available to use
uses: actions/upload-artifact@v2
with:
name: setup
path: setup.yml
As a part of a different job I need artifacts so I also have
- name: Download yaml file
uses: actions/download-artifact@v2
with:
name: setup
How can I add a step in the workflow (in my case, the last step) that's gonna remove these artifacts that were produced during runtime?
There are delete artifact actions on the marketplace that could help you with that.
Example with this one:
I made a workflow run example here if you want to have a look.