(CNN) — Robin Roberts nearly turned down a 2012 interview with then-President Barack Obama about marriage equality because she was afraid she would be outed.

The “Good Morning America” anchor said she was told there was a possibility Obama was going to announce a shift in his stance on marriage equality at the time, she told Ellen DeGeneres on Monday. Roberts, who is gay, was not yet publicly out and said she considered declining the interview.

READ MORE: Ron DeSantis Signs Bill Banning Protests Outside Any Residence

“I had not been public yet about being gay and I was frightened that I might be outed, that people might wonder, ‘Why is she the one interviewing the President when he’s making this change in his stance,'” she told DeGeneres.

She continued: “And then it was kinda like a scene out of ‘Moonstruck,’ slap, you know, snap out of it! You know, ‘Robin what are you thinking? It’s not about you. This man is going to impact countless lives.’ And it was at that moment that I said, ‘I’m going to stop letting fear keep me from the things that I want to do.'”

READ MORE: Biden Administration Makes Eight More Free COVID Tests Available For US Households

Roberts, a breast cancer survivor, also talked about her partner, Amber Laign’s battle with breast cancer.

“I haven’t talked about it much, but with you, I will,” she said. “She’s doing well, which is great.”

MORE NEWS: Military demonstration Will Take Place At Tampa Convention Center

™ & © 2022 Cable News Network, Inc., a WarnerMedia Company. All rights reserved.