Commit 7fb0132
authored
Fix Docker meta not tagging images with latest (#7984)
## Summary
- The `{{is_default_branch}}` template in `docker/metadata-action` was
not resolving correctly when running inside a container directive
(`GITHUB_EVENT_PATH does not exist`), causing the `-latest` tag to never
be applied.
- This meant images pushed on merge to main or workflow_dispatch only
got the SHA tag (e.g., `cpu-x86_64-5c716ab`) but not the `latest` tag
(e.g., `cpu-x86_64-latest`).
- Remove the `enable={{is_default_branch}}` condition since the caller
already gates `push: true` to non-PR events only.
## Failure
- Here:
https://github.com/pytorch/test-infra/actions/runs/24529169932/job/71707513243
the build and push is successful but the ``latest`` tag is not set hence
Docker is not being picked up
## Test plan
- [ ] Trigger workflow_dispatch and verify both `cpu-x86_64-<sha>` and
`cpu-x86_64-latest` tags appear in the Docker meta output
- [ ] Verify PR builds still don't push any tags1 parent 5c716ab commit 7fb0132
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
0 commit comments