From the course: Learning GitHub Actions
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
Test an action locally - GitHub Tutorial
From the course: Learning GitHub Actions
Test an action locally
- [Instructor] Now that we know more about the resources available to our custom action, let's finish our entrypoint script. To help in our development, I've created two more files, a makefile, and a JSON file with a sample push event. Let's look at the makefile. At the top of the makefile, I define a default for the keyword I want to test with. I'm using the word fixed so I'll be looking for commit messages with the word fixed in them. Following that are three build targets that will help us while testing our script. The run target builds the image before running it with the default keyword. The build target uses our Docker file to compile the Docker image and tags it with the name keyword-release-action. And finally, the test target runs the entrypoint script with a test keyword. I don't know about you, but I either forget these commands or get tired of typing them, so I appreciate having a makefile to help while I'm…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Plan a custom action4m 28s
-
(Locked)
Your custom action objective1m 7s
-
(Locked)
Dockerfile review4m 58s
-
(Locked)
Add a Dockerfile2m 20s
-
(Locked)
Add an entry-point script2m 30s
-
(Locked)
Use runtime environment resources4m 11s
-
(Locked)
Test an action locally3m 52s
-
(Locked)
Complete the entry-point script2m 2s
-
(Locked)
Add a metadata file2m 48s
-
(Locked)
Add a README file1m 48s
-
(Locked)
Deploy a custom action2m 22s
-
(Locked)
Publish an action to the Marketplace4m 16s
-
(Locked)
Challenge: Create a custom action1m
-
(Locked)
Solution: Create a custom action7m 47s
-
(Locked)
-