Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Welcome #1

Open
github-learning-lab bot opened this issue Nov 17, 2019 · 2 comments
Open

Welcome #1

github-learning-lab bot opened this issue Nov 17, 2019 · 2 comments

Comments

@github-learning-lab
Copy link

@github-learning-lab github-learning-lab bot commented Nov 17, 2019

Welcome

This course helps you create a simple GitHub Action and use that action in a workflow.

What are GitHub Actions?

GitHub Actions are a flexible way to automate nearly every aspect of your team's software workflow. Here are just a few of the ways teams are using GitHub Actions:

  • Automated testing (CI)
  • Continuous delivery and deployment
  • Responding to workflow triggers using issues, @ mentions, labels, and more
  • Triggering code reviews
  • Managing branches
  • Triaging issues and pull requests

The sky is truly the limit with GitHub Actions.

The best part, these workflows are stored as code in your repository and easily shared and reused across teams.

To learn even more, check out the GitHub Actions page.

Note: This course will only work for members of the GitHub Actions beta. Please sign up for GitHub Actions Beta before continuing this course.

Before you begin

In this course you will work with issues and pull requests, as well as edit files. If these things are familiar to you, we recommend you take the Introduction to GitHub course, first!

@github-learning-lab

This comment has been minimized.

Copy link
Author

@github-learning-lab github-learning-lab bot commented Nov 17, 2019

Actions and Workflows

There are two components to using GitHub Actions that we'll cover:

  • the action itself
  • a workflow that uses action(s)

A workflow can contain many actions. Each action has its own purpose. We'll put the files relating to the action in their own directories.

Types of Actions

Actions come in two types: container actions and JavaScript actions.

Docker container actions allow the environment to be packaged with the GitHub Actions code and can only execute in the GitHub-Hosted Linux environment.

JavaScript actions decouple the GitHub Actions code from the environment allowing faster execution but accepting greater dependency management responsibility.

Step 1: Add a Dockerfile

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 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:
    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
    RUN chmod +x /entrypoint.sh
    ENTRYPOINT ["/entrypoint.sh"]
  3. Commit your file
    • If you're working locally, you will also need stage your file and to push the branch to GitHub.
  4. Open a pull request with your new branch against master

I'll respond in your new pull request with next steps.

@issue-label-bot

This comment has been minimized.

Copy link

@issue-label-bot issue-label-bot bot commented Nov 17, 2019

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.87. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
0 participants
You can’t perform that action at this time.