Chooce video playback speed
speed:1

Using your first GitHub Action

InstructorChris Biscardi

Share this video with your friends

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.

This lesson is a Community Resource

A Community Resource means that it’s free to access for all. The instructor of this lesson requested it to be open to the public.

Instructor: 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.

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.

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.

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.