Open sync-by-unito[bot] opened 3 years ago
➤ github-learning-lab[bot] commented:
Actions and WorkflowsThere are two components to using GitHub Actions that we'll cover: * the action itself * a workflow that uses the action 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. Step 1: Creating a DockerfileActions come in two types: container actions and JavaScript actions. Our action will use a Docker container so it will require 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. ⌨️ Activity: Create a Dockerfile and open a pull request 1. Create a file titled action-a/Dockerfile by using this quick link ( https://github.com/bunthius/hello-github-actions/new/master?filename=action-a/Dockerfile ) or manually: * Create a new branch. Branches should be named intentionally, so a good name for this branch could be first-action. * On the new branch, create a directory: action-a. Note: If you're working on GitHub.com, you can create a directory and a file at the same time by naming the file action-a/Dockerfile. * In the action-a directory, create a file titled Dockerfile. 2. Fill the Dockerfile with the content below: ```Dockerfile 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
Welcome
This course helps you create a simple action and use that action in a workflow.
You can complete this course directly on GitHub, or locally by cloning this repository.
┆Issue is synchronized with this Asana task by Unito