[ci] fix env var propagation
- Add `CI` env var propagation to some places it was missing
- Use the append redirect `>>` instead of `>`, which incorrectly
overwrites the file.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79374
Approved by: https://github.com/ezyang