Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit 8308060

Browse files
authored
Merge pull request #12 from githubtraining/bdougie
@bdougie's changes
2 parents c6cc949 + aaa5fbd commit 8308060

File tree

8 files changed

+23
-14
lines changed

8 files changed

+23
-14
lines changed

config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ before:
4141

4242
steps:
4343

44-
# event: User commits the proper trigger
44+
# Step 1: User commits the proper trigger
4545
- title: Configure a trigger based on labels
4646
description: Configure the workflow trigger based on an a label being added
4747
event: pull_request.synchronize

responses/01_label-trigger.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ In a GitHub Actions workflow, the `on` step defines what causes the workflow to
2727

2828
### :keyboard: Activity: Configure the workflow trigger based on an a label being added
2929

30-
1. Edit this file
30+
1. Edit the `deploy-staging.yml` file on this branch, or [use this quick link]({{ repoUrl }}/edit/staging-workflow/.github/CHANGETHIS/deploy-staging.yml?) _(We recommend opening the quick link in another tab)_
3131
2. Change the name of the directory `CHANGETHIS` to `workflows`, so the title of this file with the path is `.github/workflows/deploy-staging.yml`
3232
3. Edit the contents of this file to trigger on a label
3333

responses/02_conditional.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ Let's put all this together to run our job only when a labeled named "stage" is
1818

1919
### :keyboard: Activity: Choose the Ubuntu environment for our app
2020

21+
1. Edit the `deploy-staging.yml` file on this branch, or [use this quick link]({{ repoUrl }}/edit/staging-workflow/.github/workflows/deploy-staging.yml?) _(We recommend opening the quick link in another tab)_
22+
2. Edit the contents of the file to add a conditional
23+
24+
Your results should look like this:
25+
2126
```yml
2227
name: Staging deployment
2328

responses/03_workflow-steps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The course [_Using GitHub Actions for CI_](https://lab.github.com/githubtraining
2929
1. Click **Add a new secret** again.
3030
1. Name the second secret **AWS_SECRET_KEY** and paste the value from the Secret access key generated on AWS.
3131
1. Click **Add secret**
32-
1. Back in this pull request, edit the `.github/workflows/deploy-staging.yml` file to use a new action
32+
2. Back in this pull request, edit the `.github/workflows/deploy-staging.yml` file to use a new action, or [use this quick link]({{ repoUrl }}/edit/staging-workflow/.github/workflows/deploy-staging.yml?) _(We recommend opening the quick link in another tab)_
3333
```yml
3434
- name: Deploy to AWS
3535
uses: github/deploy-nodejs@master

responses/05_confirm-aws.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ Amazon S3 Buckets are a very flexible type of data storage -- they can be config
1212

1313
1. Navigate to the [Amazon S3](https://s3.console.aws.amazon.com/s3/home) service and click on **Create bucket**.
1414
- See [_Create a Bucket_](https://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html) on AWS documentation for the most detailed instructions.
15-
1. Name the bucket whatever you'd like, and jot the name down
15+
1. Name the bucket whatever you'd like, and jot the name down.
1616
1. Select a region, and jot it down. You'll need it later. These examples use **US West (Oregon)**, also known as **us-west-2**. If you'd like to choose another region, make sure to update the `aws-config.yml` file to match.
1717
1. For all other options, accept the defaults.
18-
1. In `.github/aws-config.yml` on this branch, change the value of `s3_bucket:` to match your chosen bucket name.
19-
1. In the same file, confirm that the `region:` value matches your chosen region for the S3 bucket.
20-
1. Commit your changes.
18+
2. Edit the `.github/aws-config.yml` file on this branch, or [use this quick link]({{ repoUrl }}/edit/aws-configuration/.github/aws-config.yml?). _(We recommend opening the quick link in another tab.)_
19+
3. Change the value of `s3_bucket:` to match your chosen bucket name.
20+
4. In the same file, confirm that the `region:` value matches your chosen region for the S3 bucket.
21+
5. Commit your changes.
2122

2223
I'll respond when I detect a commit on this branch.

responses/09_merge-trigger.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ Let's create a new workflow that deals specifically with commits to master and h
1010

1111
### :keyboard: Activity: Write the production deployment trigger on merge to master
1212

13-
1. Rename the file in this pull request to `.github/workflows/deploy-prod.yml`.
14-
1. Add a `push` trigger.
15-
1. Add `branches` inside the push block.
16-
1. Add `- master` inside the branches block.
17-
1. Commit your changes to this branch.
13+
1. Edit the `deploy-prod.yml` file on this branch, or [use this quick link]({{ repoUrl }}/edit/production-deployment-workflow/.github/CHANGETHIS/deploy-prod.yml?) _(We recommend opening the quick link in another tab)_
14+
2. Rename the file in this pull request to `.github/workflows/deploy-prod.yml`
15+
3. Add a `push` trigger
16+
4. Add `branches` inside the push block
17+
5. Add `- master` inside the branches block
18+
6. Commit your changes to this branch
1819

1920
The file should look like this when you're finished:
2021

responses/10_deploy-prod.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ In our case, we can match our production environment to be exactly like our stag
1212

1313
### :keyboard: Commit the steps to the production workflow that allow you to deploy on merge to master
1414

15-
Add a `build` and `deploy` job to the workflow in this PR. It should look like the file below when you are finished.
15+
1. Edit the `deploy-prod.yml` file on this branch, or [use this quick link]({{ repoUrl }}/edit/production-deployment-workflow/.github/workflows/deploy-prod.yml?) _(We recommend opening the quick link in another tab)_
16+
2. Add a `build` and `deploy` job to the workflow
1617

17-
Note that not much has changed from our staging workflow, except for our trigger.
18+
It should look like the file below when you are finished. Note that not much has changed from our staging workflow, except for our trigger.
1819

1920
```yml
2021
name: Production deployment

responses/11_workflow-steps.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ All of this happens automatically once a pull request is merged!
1111

1212
### :keyboard: Activity: Write the steps for the production deployment workflow
1313

14+
1. Edit the `deploy-prod.yml` file on this branch, or [use this quick link]({{ repoUrl }}/edit/production-deployment-workflow/.github/workflows/deploy-prod.yml?) _(We recommend opening the quick link in another tab)_
1415
1. Add a job to your workflow as follows:
1516
```yml
1617
Build-and-Push-Docker-Image:

0 commit comments

Comments
 (0)