diff --git a/config.yml b/config.yml index 8acc16e..06071e9 100644 --- a/config.yml +++ b/config.yml @@ -10,7 +10,7 @@ template: repo: using-github-actions-for-ci-template name: github-actions-for-ci before: - # 1. Bot creates [Tic tac toe game](https://github.com/githubtraining/actions-template) for the learner, protects master branch + # 1. Bot creates [Tic tac toe game](https://github.com/githubtraining/actions-template) for the learner, protects main branch # 1. Bot opens a bug report explaining the app is broken, asks learner to figure out what's wrong by adding some testing. - type: updateBranchProtection - type: createIssue @@ -32,7 +32,7 @@ before: steps: # Step 1 - # 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) + # 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) # 1. Bot leaves line-specific comments explaining the pieces that were just added from the templated workflow. - title: Use a templated workflow description: Create a pull request with a templated workflow @@ -88,7 +88,7 @@ steps: # Step 2 # 1. GitHub sends us a workflow run. - # 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)) + # 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)) - title: Run a templated workflow description: Wait for GitHub to run the templated workflow and report back the results event: check_suite.completed @@ -216,7 +216,7 @@ steps: body: 06_custom-workflow.md action_id: newIssue data: - workflowUrl: "%payload.repository.html_url%/edit/master/.github/workflows/node.js.yml" + workflowUrl: "%payload.repository.html_url%/edit/main/.github/workflows/node.js.yml" store: workflow_issue_url: "{{ result.data.html_url }}" - type: respond @@ -225,7 +225,7 @@ steps: url: "%actions.newIssue.data.html_url%" # Step 7 - # 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). + # 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). # 1. Bot asks learner to add a build for Windows - title: Create a custom GitHub Actions workflow description: Edit the existing workflow with new build targets @@ -271,7 +271,7 @@ steps: node_version_pr: "{{ payload.pull_request.html_url }}" # Step 8 - # 1. Learner adds Windows to the [matrix os](https://github.com/githubtraining/actions-template/blob/master/.github/workflows/node.js.yml#L9) + # 1. Learner adds Windows to the [matrix os](https://github.com/githubtraining/actions-template/blob/main/.github/workflows/node.js.yml#L9) # 1. Bot asks learner to add a new job for testing, and separate out the test script into that new job. - title: Target a Windows environment description: Edit your workflow file to build for Windows environments @@ -407,7 +407,7 @@ steps: operator: === right: Improve CI - type: mergeBranch - head: master + head: main base: team-workflow - type: createPullRequest title: A custom workflow @@ -516,7 +516,7 @@ steps: - type: removeBranchProtection - type: requestReviewFromRegistrant - type: respond - with: 17_protect-master.md + with: 17_protect-main.md data: settingsUrl: "%payload.repository.html_url%/settings" approvalUrl: "%payload.pull_request.html_url%/files#submit-review" @@ -529,7 +529,7 @@ steps: # 1. Bot merges PR. # 1. Bot turns on pages build, drops link in the PR, explains to the learner the value on a workflow that enforces team behaviors. - title: Use branch protections - description: Complete the automated review process by protecting the master branch + description: Complete the automated review process by protecting the main branch link: "{{ store.workflow_pr_url }}" event: - pull_request_review.submitted @@ -548,7 +548,7 @@ steps: method: repos.getBranch owner: "%payload.repository.owner.login%" repo: "%payload.repository.name%" - branch: master + branch: main action_id: branchProtection - type: gate left: "%actions.branchProtection.data.protected%" diff --git a/responses/06_custom-workflow.md b/responses/06_custom-workflow.md index c320c6c..ef04e59 100644 --- a/responses/06_custom-workflow.md +++ b/responses/06_custom-workflow.md @@ -14,7 +14,7 @@ Our fictional team has a custom workflow that goes beyond the template we've use **Access to build artifacts** so that we can deploy them to a target environment icon of a security shield indicating branch protections
-**Branch protections** so that the `master` branch can't be deleted or inadvertently broken +**Branch protections** so that the `main` branch can't be deleted or inadvertently broken icon of a review approval
**Required reviews** so that any pull requests are double checked by teammates diff --git a/responses/10_use-upload.md b/responses/10_use-upload.md index ad14c83..ed26547 100644 --- a/responses/10_use-upload.md +++ b/responses/10_use-upload.md @@ -29,7 +29,7 @@ _You can follow the manual steps below, or accept the suggestion in the followin run: | npm install npm run build - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@main with: name: webpack artifacts path: public/ diff --git a/responses/11_download-suggestion.md b/responses/11_download-suggestion.md index 5228688..718786a 100644 --- a/responses/11_download-suggestion.md +++ b/responses/11_download-suggestion.md @@ -1,9 +1,9 @@ You can commit this suggestion directly. ```suggestion - - uses: actions/download-artifact@master + - uses: actions/download-artifact@main with: name: webpack artifacts path: public - name: npm install, and test -``` \ No newline at end of file +``` diff --git a/responses/11_use-download.md b/responses/11_use-download.md index c971b02..de5152d 100644 --- a/responses/11_use-download.md +++ b/responses/11_use-download.md @@ -32,7 +32,7 @@ _You can follow the manual steps below, or accept the suggestions in the followi ... steps: - uses: actions/checkout@v2 - - uses: actions/download-artifact@master + - uses: actions/download-artifact@main with: name: webpack artifacts path: public diff --git a/responses/12_merge-improved-ci.md b/responses/12_merge-improved-ci.md index 09c2442..108b1a7 100644 --- a/responses/12_merge-improved-ci.md +++ b/responses/12_merge-improved-ci.md @@ -16,8 +16,8 @@ Our custom workflow now accounts for: ---- In the next few steps, we'll finish supporting our team's workflow: -- **branch protections** so that the `master` branch can't be deleted or inadvertently broken +- **branch protections** so that the `main` branch can't be deleted or inadvertently broken - **required reviews** so that any pull requests are double checked by teammates - **obvious approvals** so we can merge quickly and potentially automate merges and deployments -I'll respond when you merge this pull request. \ No newline at end of file +I'll respond when you merge this pull request. diff --git a/responses/13_partial-workflow.md b/responses/13_partial-workflow.md index a9bd7ef..351200e 100644 --- a/responses/13_partial-workflow.md +++ b/responses/13_partial-workflow.md @@ -5,7 +5,7 @@ Remember the [custom workflow]({{ workflowIssue }}) we are attempting to create - :white_check_mark: **test against multiple targets** so that we know if our supported operating systems and Node.js versions are working - :white_check_mark: **dedicated test job** so that we can separate out build from test details - :white_check_mark: **access to build artifacts** so that we can deploy them to a target environment -- **branch protections** so that the `master` branch can't be deleted or inadvertently broken +- **branch protections** so that the `main` branch can't be deleted or inadvertently broken - **required reviews** so that any pull requests are double checked by teammates - **obvious approvals** so we can merge quickly and potentially automate merges and deployments @@ -23,4 +23,4 @@ GitHub Actions can run multiple workflows for different event triggers. Let's cr name: Team awesome's approval workflow ``` -I'll respond when you commit to this branch. \ No newline at end of file +I'll respond when you commit to this branch. diff --git a/responses/17_add-step-suggestion.md b/responses/17_add-step-suggestion.md index 3d899b4..9152a72 100644 --- a/responses/17_add-step-suggestion.md +++ b/responses/17_add-step-suggestion.md @@ -1,15 +1,15 @@ ### Step 17: Hint 1. Edit the [workflow file]({{ editUrl }}) on this branch. -1. Give your step a name, have it use `pullreminders/label-when-approved-action@master`, and set all the required environment variables. +1. Give your step a name, have it use `pullreminders/label-when-approved-action@main`, and set all the required environment variables. ```suggestion runs-on: ubuntu-latest steps: - name: Label when approved - uses: pullreminders/label-when-approved-action@master + uses: pullreminders/label-when-approved-action@main env: APPROVALS: "1" GITHUB_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} ADD_LABEL: "approved" ``` -1. Commit your changes to this branch. \ No newline at end of file +1. Commit your changes to this branch. diff --git a/responses/17_protect-master.md b/responses/17_protect-main.md similarity index 93% rename from responses/17_protect-master.md rename to responses/17_protect-main.md index 5de585b..8d69807 100644 --- a/responses/17_protect-master.md +++ b/responses/17_protect-main.md @@ -6,7 +6,7 @@ Awesome! We can now check an additional requirement off our list! - :white_check_mark: **dedicated test job** so that we can separate out build from test details - :white_check_mark: **access to build artifacts** so that we can deploy them to a target environment - :white_check_mark: **obvious approvals** so we can merge quickly and potentially automate merges and deployments -- **branch protections** so that the `master` branch can't be deleted or inadvertently broken +- **branch protections** so that the `main` branch can't be deleted or inadvertently broken - **required reviews** so that any pull requests are double checked by teammates 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 Next, add branch protections and continue with the course. -### :keyboard: Activity: Complete the automated review process by protecting the master branch +### :keyboard: Activity: Complete the automated review process by protecting the main branch 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**. 2. Click on [**Add rule**]({{ settingsUrl }}/branch_protection_rules/new) under "Branch protection rules". -3. Type `master` in **Branch name pattern**. +3. Type `main` in **Branch name pattern**. 4. Check **Require pull request reviews before merging**. 5. Check **Require status checks to pass before merging**. 6. Check all build and test jobs that you'd like to see in the newly visible gray box. diff --git a/responses/18_congratulations.md b/responses/18_congratulations.md index aedf0b9..d36ec6d 100644 --- a/responses/18_congratulations.md +++ b/responses/18_congratulations.md @@ -5,7 +5,7 @@ Nice work, you did it! Your workflows now contain: - :white_check_mark: **test against multiple targets** so that we know if our supported operating systems and Node.js versions are working - :white_check_mark: **dedicated test job** so that we can separate out build from test details - :white_check_mark: **access to build artifacts** so that we can deploy them to a target environment -- :white_check_mark: **branch protections** so that the `master` branch can't be deleted or inadvertently broken +- :white_check_mark: **branch protections** so that the `main` branch can't be deleted or inadvertently broken - :white_check_mark: **required reviews** so that any pull requests are double checked by teammates - :white_check_mark: **obvious approvals** so we can merge quickly and potentially automate merges and deployments