CharlotteDeltaRM / github-actions-for-packages

https://lab.github.com/githubtraining/github-actions:-publish-to-github-packages
MIT License
0 stars 0 forks source link

Setting Up CI #1

Closed github-learning-lab[bot] closed 3 years ago

github-learning-lab[bot] commented 3 years ago

Welcome

Welcome to the Learning Lab course "Using GitHub Actions for CD". What is CD? If you don't already know, you'll find out soon!

Before you get started, it's important that you are comfortable with a few skills. We recommend going through the Introduction to GitHub Learning Lab course and the Hello, GitHub Actions! Learning Lab course before beginning this one.

Other experience with workflow automation will help, but are not necessary to complete this course.

Set up CI Workflow

What is CI?

First, take a moment to examine the image below. It shows the relationship between continuous integration, continuous delivery and continuous deployment.

Continuous integration (CI) is a practice where developers integrate code into a shared branch several times per day. The shared branch is sometimes referred to as trunk, but on Git, it's named main. To integrate code, developers commit on other Git branches, push their changes, and merge to main through pull requests.

Automated events take place throughout this process. These events can range from running tests or deployments to cross-linking to relevant threads. Here's an example that we will use:

GOAL: Regular code integration enables faster and easier error detection.

Why do we need this?

Continuous delivery (CD) is the natural "next phase" of continuous integration (CI). Setting up a CI workflow will show us the entire picture of our workflow.

But, this is NOT a course on CI. We will not being going into detail on what CI means, or how to use CI with GitHub Actions.

Wait! There's good news 👍! If you need a CI refresher you can take the Using GitHub Actions for CI Learning Lab course to get up to speed.

github-learning-lab[bot] commented 3 years ago

Moving the workflow file to .github/workflows/ci-workflow.yml

There is a file on this branch called ci-workflow.yml. But, now I need your help!

Step 1: Move the workflow file

As a bot 🤖, I can only do so many things. Setting up a workflow for you isn't something I can do. Don't worry, I'll be here to help you, just follow these steps and we should be good to go. 👍

Please move the ci-workflow.yml file into a new folder and update the contents of the file.

At first, it will look like this: screenshot of file title as `.github/ci-workflow.yml

When you're done renaming, you will have created a new directory and moved the file into that new directory. Your file title should look like this:

screenshot of file title as `.github/workflows/ci-workflow.yml

:keyboard: Move the ci-workflow.yml file

  1. Edit the file location by changing its name from ci-workflow.yml to workflows/ci-workflow.yml.
  2. Commit the file to the ci-workflow branch once you have changed the path: screenshot highlighting the commit changes button
github-learning-lab[bot] commented 3 years ago

Great Job 👍

I have merged this pull request for you, and opened a new one for you to start working on the CD segment of our workflow.

Navigate to the next pull request to continue this course.