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

Commit d09c6f9

Browse files
authored
Merge pull request #51 from githubtraining/update-branch-name
Update branch name
2 parents e33c168 + 6d59f98 commit d09c6f9

10 files changed

Lines changed: 26 additions & 26 deletions

config.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ template:
1010
repo: using-github-actions-for-ci-template
1111
name: github-actions-for-ci
1212
before:
13-
# 1. Bot creates [Tic tac toe game](https://github.com/githubtraining/actions-template) for the learner, protects master branch
13+
# 1. Bot creates [Tic tac toe game](https://github.com/githubtraining/actions-template) for the learner, protects main branch
1414
# 1. Bot opens a bug report explaining the app is broken, asks learner to figure out what's wrong by adding some testing.
1515
- type: updateBranchProtection
1616
- type: createIssue
@@ -32,7 +32,7 @@ before:
3232

3333
steps:
3434
# Step 1
35-
# 1. Learner opens a PR with a new workflow by using the [templated workflow for Node](https://github.com/actions/starter-workflows/blob/master/ci/node.js.yml)
35+
# 1. Learner opens a PR with a new workflow by using the [templated workflow for Node](https://github.com/actions/starter-workflows/blob/main/ci/node.js.yml)
3636
# 1. Bot leaves line-specific comments explaining the pieces that were just added from the templated workflow.
3737
- title: Use a templated workflow
3838
description: Create a pull request with a templated workflow
@@ -88,7 +88,7 @@ steps:
8888

8989
# Step 2
9090
# 1. GitHub sends us a workflow run.
91-
# 1. Bot explains what is happening, and why the page build failed (we don't have a [test script](https://github.com/githubtraining/actions-template/blob/master/package.json#L10))
91+
# 1. Bot explains what is happening, and why the page build failed (we don't have a [test script](https://github.com/githubtraining/actions-template/blob/main/package.json#L10))
9292
- title: Run a templated workflow
9393
description: Wait for GitHub to run the templated workflow and report back the results
9494
event: check_suite.completed
@@ -216,7 +216,7 @@ steps:
216216
body: 06_custom-workflow.md
217217
action_id: newIssue
218218
data:
219-
workflowUrl: "%payload.repository.html_url%/edit/master/.github/workflows/node.js.yml"
219+
workflowUrl: "%payload.repository.html_url%/edit/main/.github/workflows/node.js.yml"
220220
store:
221221
workflow_issue_url: "{{ result.data.html_url }}"
222222
- type: respond
@@ -225,7 +225,7 @@ steps:
225225
url: "%actions.newIssue.data.html_url%"
226226

227227
# Step 7
228-
# 1. Learner edits the first workflow changing from templated [Node v8,10,12 to just v8,10](https://github.com/githubtraining/actions-template/blob/master/.github/workflows/node.js.yml#L10).
228+
# 1. Learner edits the first workflow changing from templated [Node v8,10,12 to just v8,10](https://github.com/githubtraining/actions-template/blob/main/.github/workflows/node.js.yml#L10).
229229
# 1. Bot asks learner to add a build for Windows
230230
- title: Create a custom GitHub Actions workflow
231231
description: Edit the existing workflow with new build targets
@@ -271,7 +271,7 @@ steps:
271271
node_version_pr: "{{ payload.pull_request.html_url }}"
272272

273273
# Step 8
274-
# 1. Learner adds Windows to the [matrix os](https://github.com/githubtraining/actions-template/blob/master/.github/workflows/node.js.yml#L9)
274+
# 1. Learner adds Windows to the [matrix os](https://github.com/githubtraining/actions-template/blob/main/.github/workflows/node.js.yml#L9)
275275
# 1. Bot asks learner to add a new job for testing, and separate out the test script into that new job.
276276
- title: Target a Windows environment
277277
description: Edit your workflow file to build for Windows environments
@@ -407,7 +407,7 @@ steps:
407407
operator: ===
408408
right: Improve CI
409409
- type: mergeBranch
410-
head: master
410+
head: main
411411
base: team-workflow
412412
- type: createPullRequest
413413
title: A custom workflow
@@ -516,7 +516,7 @@ steps:
516516
- type: removeBranchProtection
517517
- type: requestReviewFromRegistrant
518518
- type: respond
519-
with: 17_protect-master.md
519+
with: 17_protect-main.md
520520
data:
521521
settingsUrl: "%payload.repository.html_url%/settings"
522522
approvalUrl: "%payload.pull_request.html_url%/files#submit-review"
@@ -529,7 +529,7 @@ steps:
529529
# 1. Bot merges PR.
530530
# 1. Bot turns on pages build, drops link in the PR, explains to the learner the value on a workflow that enforces team behaviors.
531531
- title: Use branch protections
532-
description: Complete the automated review process by protecting the master branch
532+
description: Complete the automated review process by protecting the main branch
533533
link: "{{ store.workflow_pr_url }}"
534534
event:
535535
- pull_request_review.submitted
@@ -548,7 +548,7 @@ steps:
548548
method: repos.getBranch
549549
owner: "%payload.repository.owner.login%"
550550
repo: "%payload.repository.name%"
551-
branch: master
551+
branch: main
552552
action_id: branchProtection
553553
- type: gate
554554
left: "%actions.branchProtection.data.protected%"

responses/06_custom-workflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Our fictional team has a custom workflow that goes beyond the template we've use
1414
**Access to build artifacts** so that we can deploy them to a target environment
1515

1616
<img alt="icon of a security shield indicating branch protections" align="left" width="50" height="50" src="https://user-images.githubusercontent.com/6351798/88609465-6a1da200-d041-11ea-9c4c-55ffe90a3e72.png"><br/>
17-
**Branch protections** so that the `master` branch can't be deleted or inadvertently broken
17+
**Branch protections** so that the `main` branch can't be deleted or inadvertently broken
1818

1919
<img alt="icon of a review approval" align="left" width="50" height="50" src="https://user-images.githubusercontent.com/6351798/88609558-9df8c780-d041-11ea-906f-dd23efd9f65c.png"><br/>
2020
**Required reviews** so that any pull requests are double checked by teammates

responses/10_use-upload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ _You can follow the manual steps below, or accept the suggestion in the followin
2929
run: |
3030
npm install
3131
npm run build
32-
- uses: actions/upload-artifact@master
32+
- uses: actions/upload-artifact@main
3333
with:
3434
name: webpack artifacts
3535
path: public/
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
You can commit this suggestion directly.
22

33
```suggestion
4-
- uses: actions/download-artifact@master
4+
- uses: actions/download-artifact@main
55
with:
66
name: webpack artifacts
77
path: public
88
- name: npm install, and test
9-
```
9+
```

responses/11_use-download.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ _You can follow the manual steps below, or accept the suggestions in the followi
3232
...
3333
steps:
3434
- uses: actions/checkout@v2
35-
- uses: actions/download-artifact@master
35+
- uses: actions/download-artifact@main
3636
with:
3737
name: webpack artifacts
3838
path: public

responses/12_merge-improved-ci.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Our custom workflow now accounts for:
1616
----
1717

1818
In the next few steps, we'll finish supporting our team's workflow:
19-
- **branch protections** so that the `master` branch can't be deleted or inadvertently broken
19+
- **branch protections** so that the `main` branch can't be deleted or inadvertently broken
2020
- **required reviews** so that any pull requests are double checked by teammates
2121
- **obvious approvals** so we can merge quickly and potentially automate merges and deployments
2222

23-
I'll respond when you merge this pull request.
23+
I'll respond when you merge this pull request.

responses/13_partial-workflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Remember the [custom workflow]({{ workflowIssue }}) we are attempting to create
55
- :white_check_mark: **test against multiple targets** so that we know if our supported operating systems and Node.js versions are working
66
- :white_check_mark: **dedicated test job** so that we can separate out build from test details
77
- :white_check_mark: **access to build artifacts** so that we can deploy them to a target environment
8-
- **branch protections** so that the `master` branch can't be deleted or inadvertently broken
8+
- **branch protections** so that the `main` branch can't be deleted or inadvertently broken
99
- **required reviews** so that any pull requests are double checked by teammates
1010
- **obvious approvals** so we can merge quickly and potentially automate merges and deployments
1111

@@ -23,4 +23,4 @@ GitHub Actions can run multiple workflows for different event triggers. Let's cr
2323
name: Team awesome's approval workflow
2424
```
2525
26-
I'll respond when you commit to this branch.
26+
I'll respond when you commit to this branch.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
### Step 17: Hint
22

33
1. Edit the [workflow file]({{ editUrl }}) on this branch.
4-
1. Give your step a name, have it use `pullreminders/label-when-approved-action@master`, and set all the required environment variables.
4+
1. Give your step a name, have it use `pullreminders/label-when-approved-action@main`, and set all the required environment variables.
55
```suggestion
66
runs-on: ubuntu-latest
77
steps:
88
- name: Label when approved
9-
uses: pullreminders/label-when-approved-action@master
9+
uses: pullreminders/label-when-approved-action@main
1010
env:
1111
APPROVALS: "1"
1212
GITHUB_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
1313
ADD_LABEL: "approved"
1414
```
15-
1. Commit your changes to this branch.
15+
1. Commit your changes to this branch.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Awesome! We can now check an additional requirement off our list!
66
- :white_check_mark: **dedicated test job** so that we can separate out build from test details
77
- :white_check_mark: **access to build artifacts** so that we can deploy them to a target environment
88
- :white_check_mark: **obvious approvals** so we can merge quickly and potentially automate merges and deployments
9-
- **branch protections** so that the `master` branch can't be deleted or inadvertently broken
9+
- **branch protections** so that the `main` branch can't be deleted or inadvertently broken
1010
- **required reviews** so that any pull requests are double checked by teammates
1111

1212
We'll now use branch protections in combination with this change so that everything goes smoothly. Up until now, I've handled branch protections for you, but I've removed them so that you can learn how to set them.
@@ -21,11 +21,11 @@ Protected branches ensure that collaborators on your repository cannot make irre
2121

2222
Next, add branch protections and continue with the course.
2323

24-
### :keyboard: Activity: Complete the automated review process by protecting the master branch
24+
### :keyboard: Activity: Complete the automated review process by protecting the main branch
2525

2626
1. Go to [**Branches**]({{ settingsUrl}}/branches) settings. You can navigate to that page manually by clicking on the right-most tab in the top of the repository called **Settings** and then clicking on **Branches**.
2727
2. Click on [**Add rule**]({{ settingsUrl }}/branch_protection_rules/new) under "Branch protection rules".
28-
3. Type `master` in **Branch name pattern**.
28+
3. Type `main` in **Branch name pattern**.
2929
4. Check **Require pull request reviews before merging**.
3030
5. Check **Require status checks to pass before merging**.
3131
6. Check all build and test jobs that you'd like to see in the newly visible gray box.

responses/18_congratulations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Nice work, you did it! Your workflows now contain:
55
- :white_check_mark: **test against multiple targets** so that we know if our supported operating systems and Node.js versions are working
66
- :white_check_mark: **dedicated test job** so that we can separate out build from test details
77
- :white_check_mark: **access to build artifacts** so that we can deploy them to a target environment
8-
- :white_check_mark: **branch protections** so that the `master` branch can't be deleted or inadvertently broken
8+
- :white_check_mark: **branch protections** so that the `main` branch can't be deleted or inadvertently broken
99
- :white_check_mark: **required reviews** so that any pull requests are double checked by teammates
1010
- :white_check_mark: **obvious approvals** so we can merge quickly and potentially automate merges and deployments
1111

0 commit comments

Comments
 (0)