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.

Add an entry-point script

Add an entry-point script - GitHub Tutorial

From the course: Learning GitHub Actions

Start my 1-month free trial

Add an entry-point script

- [Instructor] Let's get started on the entry point script. The first thing we need to do is make it executable. This will allow the script to be run when the container starts. I'll do that with the chmod +x command. Now let's take a look at the LS of this directory. In this output, we can see that the entry point script is now executable. We can tell by the X entries in the mode for the file. Now let's take a look at the script. At the top is the shebang line. This tells the operating system which interpreter to use to run the script. In this case, we're using Bash. I've also added the set -e directive so Bash will exit the script immediately if an error is encountered. After that are some comments outlining what our script does. If we see the keyword, then do something. If not, exit gracefully. The dollar sign star is a variable that contains the arguments that were passed to the script. So for our if statement,…

Contents