From the course: Learning GitHub Actions

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Use an action from a repository

Use an action from a repository - GitHub Tutorial

From the course: Learning GitHub Actions

Start my 1-month free trial

Use an action from a repository

- [Instructor] So far, we've seen how to add actions from the marketplace. Now let's take a look at adding actions from a GitHub repository. Actions can be referenced from the same repo as the workflow, any public repository, and docker images published to a repository like Docker Hub. If you want to use an action in the same repository as the workflow, we can specify any path relative to the root of the repo, so if the target action was inside the .github directory in a directory named action1, we would use the path starting with the dot followed by a slash and so on all the way down to the action1 directory. If we need to call an action from a different repository, we need to specify the ID of the user or organization that owns the repo, the name of the repo itself, and a reference pointing inside the repo. The reference can be a specific branch like the master branch, for example. Or it can be a tag or a SHA…

Contents