-
A real-world example of this is the OpenTofu project, which uses the checkout action as part of its pipeline to clone the OpenTofu repository before building the OSS release:
-
Stream
Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
-
A GitHub account and basic familiarity with GitHub actions are requirements for using GitHub actions. Additionally, you will need the GitHub CLI to follow along with the hands-on demo later in this post.
-
The snippet above creates a step called "Checkout repository", which uses the actions/checkout action. The @ character allows you to pin the version of the action - in this case, version v4. You can see previous and future versions in the checkout releases on GitHub.
-
For this tutorial, we will combine some of the use cases above by building a workflow that clones the dev branch of this demo repository and displays a text file from that branch.