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

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…

Contents