⚠️ This lesson is retired and might contain outdated information.

Using your first GitHub Action

Chris Biscardi
InstructorChris Biscardi
Share this video with your friends

Social Share Links

Send Tweet

GitHub Actions can feel daunting. Here's a walkthrough setting up your first action that runs some command line scripts on every push to master.

Instructor: [00:00] To set up our first GitHub action and use it, we'll first create a new repo. After we create our first repository, we can get to the actions by clicking on the Actions tab. GitHub has provided a set of starter workflows under the Action's namespace.

[00:18] You can see that this workflow in particular echoes "Hello, World!" and then echoes two more lines. It also uses the Action's checkout action, which comes from the same Action's namespace. We'll choose to set up this workflow.

[00:34] We'll give our workflow a name. We can see that it's fired on every push. It runs on Ubuntu, the latest, and it has the same steps that we looked at before. We'll commit this. Now we'll go back into the Actions tab. Notice that no workflows have yet been run. After cloning the repository, we can find our workflow in .github/workflows/echo-content.yml.

[01:05] We'll create a README and add it to our repo. Now that we've pushed to our repo, we can see our action running. Note that we can see the logs in real time.