From the course: Learning GitHub Actions
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
Complete the entry-point script - GitHub Tutorial
From the course: Learning GitHub Actions
Complete the entry-point script
- [Instructor] At this point, we verified our script is working and we tested it with our Dockerfile using a sample JSON payload. Let's take a look at the script after it's been updated with code that interacts with a GitHub API. I'm viewing the entrypoint script in then now, and I have the line numbers turned on to help with finding details in the script. On line 23, we create a VERSION variable. We'll use that to name and tag the release. On lines 25 through 29, we use the VERSION variable and printf statements, to format a JSON string and store that in a variable named DATA. We'll be posting that data to the GitHub API to create our release. On line 31, we use the GITHUB_REPOSITORY environment variable to build the URL that we'll use to post to the API. We also add the GITHUB_TOKEN environment variable to the end of the file, so our call to the API can authenticate to our GitHub account. Using these environment…
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)
-