Skip to content

Update cleanup job in build-and-run-batch-job workflow to run on branch deletion #37

@jeancochrane

Description

@jeancochrane

Currently we run the cleanup job in the build-and-run-batch-job workflow on closed PRs:

cleanup:
# Only run on closed PRs, to destroy staging resources
# yamllint disable-line rule:line-length
if: github.event_name == 'pull_request' && github.event.action == 'closed'

However, we run many of our Batch jobs on branches that we never end up putting up as PRs. As a result, we've accumulated a bunch of old Batch resources that we never use from zombie branches.

We should update our conditional logic for this job to also run on the delete event so that we can clean up resources if a branch is deleted but was never put up as a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions