[GHA] Deleting artifacts defined by repository (IaC) before repository deletion

Hi guys!

I’ve wanted to know if there is a way to trigger a final workflow to delete repository artifacts triggered by a repository deletion event.

Like for example, I have a IaC project repository defining a specific artifacts on the cloud. But after sometime the project becomes deprecated for N reasons.

Today, if I delete the repository, the artifacts defined by the project are not deleted, I’ll have to delete them manually.

I wanted to know if there is an easy way to, when delete the repository, send an event and trigger a final workflow in GitHub Actions, to destroy all artifacts defined in the infrastructure code (like pulumi destroy).

I did search, but couldn’t find a workflow, event to do this today, sincerely I’m kinda outdated about the newest releases (GHA is evolving fast :P)

1 Like