Open github-learning-lab[bot] opened 5 years ago
There are two components to using GitHub Actions that we'll cover:
A workflow can contain many actions, but each action has its own purpose. So, we'll put the files relating to the action in their own directory.
Dockerfile
Every GitHub Action runs in a Docker container and requires a Dockerfile
. Let's add it now. We won't discuss what each line means in detail, but the important thing to know is that the action will be executed in an environment defined by this file.
Dockerfile
and open a pull requestfirst-action
action-a
action-a/Dockerfile
action-a
directory, create a file titled Dockerfile
Fill the Dockerfile
with the content below:
FROM debian:9.5-slim
LABEL "com.github.actions.name"="Hello World"
LABEL "com.github.actions.description"="Write arguments to the standard output"
LABEL "com.github.actions.icon"="mic"
LABEL "com.github.actions.color"="purple"
LABEL "repository"="http://github.com/octocat/hello-world"
LABEL "homepage"="http://github.com/actions"
LABEL "maintainer"="Octocat <octocat@github.com>"
ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
master
git branch frist-action
Welcome
This is a companion course to the Developer Guide: Creating a new workflow. For the most complete information, see the documentation.
There are parts of this course which will need to be completed locally, using the command line. During those steps, more instructions are provided in case you're used to working with the GitHub.com interface directly.