diff --git a/.github/steps/1-add-a-test-workflow.md b/.github/steps/1-add-a-test-workflow.md index fe3fdf1..4c900b1 100644 --- a/.github/steps/1-add-a-test-workflow.md +++ b/.github/steps/1-add-a-test-workflow.md @@ -21,7 +21,7 @@ _Welcome to "GitHub Actions: Continuous Integration"! :wave:_ To learn more, check out [Workflow syntax for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions) in the GitHub Docs. -First, let's add a workflow to *lint* (clean, like a lint roller) our Markdown files in this repository. This workflow has a deliberate error in it ("npx" should be "npm"), which we'll debug in the next unit. +First, let's add a workflow to lint (clean, like a lint roller) our Markdown files in this repository. ### :keyboard: Activity: Add a test workflow @@ -42,4 +42,4 @@ First, let's add a workflow to *lint* (clean, like a lint roller) our Markdown f 1. Click **Commit changes...**, and choose to make a new branch named `ci`. 1. Click **Propose changes**. 1. Click **Create pull request**. -1. Wait about 20 seconds then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/actions) will automatically update to the next step. +1. Wait about 20 seconds and then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/actions) will automatically update to the next step. diff --git a/.github/steps/3-upload-test-reports.md b/.github/steps/3-upload-test-reports.md index f7a5bdf..f92623b 100644 --- a/.github/steps/3-upload-test-reports.md +++ b/.github/steps/3-upload-test-reports.md @@ -37,6 +37,6 @@ To upload artifacts to the artifact storage, we can use an action built by GitHu ``` 1. Commit your change to this branch. -1. Wait about 20 seconds then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/actions) will automatically update to the next step. +1. Wait about 20 seconds and then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/actions) will automatically update to the next step. Like the upload action to send artifacts to the storage, you can use the download action to download these previously uploaded artifacts from the `build` job: [`actions/download-artifact`](https://github.com/actions/download-artifact). For brevity, we'll skip that step for this course. diff --git a/.github/steps/4-add-branch-protections.md b/.github/steps/4-add-branch-protections.md index ca95f55..b84512e 100644 --- a/.github/steps/4-add-branch-protections.md +++ b/.github/steps/4-add-branch-protections.md @@ -18,9 +18,8 @@ Protected branches ensure that collaborators on your repository cannot make irre 1. Click **Add branch protection rule** under "Branch protection rules". 1. Type `main` in **Branch name pattern**. 1. Check **Require a pull request before merging**. +1. Uncheck **Require approvals**. 1. Check **Require status checks to pass before merging**. 1. Check all build and test jobs that you'd like to see in the newly visible gray box. 1. Click **Save changes**. -1. _Once you turn on branch protection, Actions can no longer push directly to `main`. You'll need to open the next step on your own._ - - +1. _Once you turn on branch protection, Actions can no longer push directly to the `main` branch. Wait about 20 seconds and then go to the `ci` branch. [GitHub Actions](https://docs.github.com/actions) will automatically update to the next step on the `ci` branch. You'll need to follow instructions on this branch._ diff --git a/.github/steps/5-merge-your-pull-request.md b/.github/steps/5-merge-your-pull-request.md index 8d6dc55..5fe659c 100644 --- a/.github/steps/5-merge-your-pull-request.md +++ b/.github/steps/5-merge-your-pull-request.md @@ -12,11 +12,7 @@ You can now [merge](https://docs.github.com/get-started/quickstart/github-glossa ### :keyboard: Activity: Merge your pull request +1. Go to the **Pull requests** tab. +1. Resolve any merge conflicts. 1. Click **Merge pull request**. -1. Delete the branch `ci` (optional). -1. _Once you turn on branch protection, Actions can no longer push directly to `main`. You'll need to open the "finish" on your own._ - 1. Navigate to the `.github` directory. - 1. Select the `steps` directory. - 1. Open the `X-finish.md` file. - - +1. _Once you turn on branch protection, Actions can no longer push directly to the `main` branch. Make sure that you're on the `ci` branch in the page you're following instructions from._ Wait about 20 seconds and then refresh the page. [GitHub Actions](https://docs.github.com/actions) will automatically update to the next step. diff --git a/.github/workflows/4-add-branch-protections.yml b/.github/workflows/4-add-branch-protections.yml index 2a8a516..24f2dfd 100644 --- a/.github/workflows/4-add-branch-protections.yml +++ b/.github/workflows/4-add-branch-protections.yml @@ -57,12 +57,12 @@ jobs: ref: ci # Important, as normally `branch_protection_rule` event won't grab other branches - # TODO: figure out a better way to deal with the lock on `main`, merge conflict this creates + # TODO: figure out a better way to deal with the merge conflict. # In README.md, switch step 4 for step 5. - # - name: Update to step 5 - # uses: skills/action-update-step@v2 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # from_step: 4 - # to_step: 5 - # branch_name: ci + - name: Update to step 5 + uses: skills/action-update-step@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + from_step: 4 + to_step: 5 + base_branch_name: ci diff --git a/.github/workflows/5-merge-your-pull-request.yml b/.github/workflows/5-merge-your-pull-request.yml index 64e7dce..6ed9da2 100644 --- a/.github/workflows/5-merge-your-pull-request.yml +++ b/.github/workflows/5-merge-your-pull-request.yml @@ -55,12 +55,11 @@ jobs: fetch-depth: 0 # Let's get all the branches. - # TODO: figure out a better way to deal with the lock on `main` # In README.md, switch step 5 for step X. - # - name: Update to step X - # uses: skills/action-update-step@v2 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # from_step: 5 - # to_step: X - # branch_name: ci + - name: Update to step X + uses: skills/action-update-step@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + from_step: 5 + to_step: X + base_branch_name: ci