What is actions/checkout@v2 in Github action?

Hi,
I tried to search for an answer about ```
actions/checkout@v2


Can someone explains thing abit to me? Tks.

It is an official GitHub Action used to check-out a repository so a workflow can access it.

By default, this action will check-out to the SHA for that workflow’s event (such as push and pull_request). Otherwise, uses the default branch (usually main or master in a standard repository).

2 Likes