The first things Noah does after leaving the ark are building an altar, offering sacrifices, and giving thanks to the Lord. Because of Noah’s righteousness, the Lord establishes His covenant with him.
Genesis 8:20; Joseph Smith Translation, Genesis 9:4
20 And Noah builded an altar unto the Lord; and took of every clean beast, and of every clean fowl, and offered burnt offerings on the altar. . . .
4 And Noah builded an altar unto the Lord, and took of every clean beast, and of every clean fowl, and offered burnt offerings on the altar; and gave thanks unto the Lord, and rejoiced in his heart.
Elder Paul E. Koelliker said:
“In the Old Testament we are taught the Lord’s covenant pattern in Noah’s experience with a wicked world and the Lord’s plan for cleansing the earth. Because of Noah’s faithful, steadfast commitment, the Lord said to him:
“‘But with thee will I establish my covenant; and thou shalt come into the ark, thou, and thy sons, and thy wife, and thy sons’ wives with thee. . . .
“‘And Noah did . . . all that the Lord commanded him’ (Genesis 6:18; Genesis 7:5).
“After the floods were abated, they [Noah and his family] went forth out of the ark.
“‘And Noah builded an altar unto the Lord. . . .
“‘And God spake unto Noah, and to his sons [who were] with him, saying,
“‘And I, behold, I establish my covenant with you, and with your seed after you’ (Genesis 8:20; Genesis 9:8–9).
“We too have entered into sacred covenants with the Lord that we might be preserved from the adversary. Just as in Noah’s time, we live in a day of prophetic promise and fulfillment.”
(“Gospel Covenants Bring Promised Blessings,” Ensign or Liahona, Nov. 2005, 94.)