Remove PR ref from delete workflow#170
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a4fb67a500
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -24,7 +24,6 @@ jobs: | |||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |||
| with: | |||
| path: dd-trace-java-docker-build | |||
There was a problem hiding this comment.
Preserve cleanup for unmerged variant-change PRs
When cleanup is needed before the source PR is merged or after it is closed without merging, this now checks out the default workflow ref instead of the PR ref. The create workflow still runs the PR version of scripts/create-test-mirror-entries.sh, which writes tags from that PR's CI_VARIANTS, while delete-test-mirror-entries.sh reconstructs an exact mirror.yaml block from the checked-out script and exits if it does not match. A PR that adds/removes a variant can therefore create mirror entries that this delete workflow cannot remove unless the PR has already landed; consider falling back to the PR ref when it exists or deleting by prefix rather than by the default-branch variant list.
Useful? React with 👍 / 👎.
Since README instructions recommend deleting the images after merge, the tested PR's changes will already be in
masterwhen we want to delete its test images.Moreover, after the PR is merged, GitHub removes references to
refs/pull/${{ github.event.inputs.pr_number }}/merge.See: https://github.com/DataDog/dd-trace-java-docker-build/actions/runs/28878825640/job/85661134146