Skip to content

Commit

Permalink
updating from bugs found in class
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris McIntosh committed Jul 1, 2021
1 parent 9392468 commit 83409d1
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 21 deletions.
3 changes: 2 additions & 1 deletion README.docs.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
** # Deprecated please do not follow links in this guide**
# Migrating to GitHub Actions Facilitator Guide

Welcome to the Migrating to GitHub Actions offering repo. In this repo, you will find the content used by GitHub during our official actions training and consulting.
Expand All @@ -6,7 +7,7 @@ If you have access to this repository, it is because your company has an agreeme

## Deploy the manual

This guid is currently deployed to GitHub pages and [can be found here](https://githubtraining.github.io/actions-facilitator-guide/)
This guid is currently deployed to GitHub pages and can be found here

If you would like to contribute to the guide follow the steps in the **Preview changes on your machine** section.

Expand Down
3 changes: 1 addition & 2 deletions docs/01.1_actions-about.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ GitHub Actions allow you to:
- Get email notifications about workflow runs

### Exercise 1 - Creating the Dockerfile
- Access exercise 1 from your repository in `Exercises/01-Create-Dockerfile.md`
- Follow the steps to get your dockerfile built and merged into your repository
[exercise-1](Exercises/01-Create-Dockerfile.md ':include')

8 changes: 8 additions & 0 deletions docs/01.2_actions-pricing.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,12 @@ The number of concurrent jobs you can run in your account depends on your GitHub
| Team | 60 | 5 |
| Enterprise | 180 | 50 |


#### Pricing
| Operating System | Price Per Minute |
| ----------- | --------------------- |
| Linux | $0.008 |
| macOS | $0.08 |
| Windows | $0.016 |

<p class="custom-danger-box">Usage limits and pricing are subject to change, please visit the <a href=https://help.github.com/en/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-actions>About billing for GitHub Actions</a> page of the help documentation</p>
22 changes: 22 additions & 0 deletions docs/02.10_secrets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Secrets with Actions {docsify-ignore-all}

Often it is necessary to use secrets within your workflows. Whether it is to authenticate to the API to notify users or connect to a cloud environment to deploy code. [GitHub Secrets](https://docs.github.com/en/actions/reference/encrypted-secrets) is the way you connect your secrets with your workflows.

Secrets can currently live at many levels:
- Organization
- Repository
- Environment


### Limits
[Per the GitHub documentation](https://docs.github.com/en/actions/reference/encrypted-secrets#limits-for-secrets) the limits for secrets are:
- 1000 Organization secrets
- 100 Repository secrets
- 100 Environment secrets
- 64KB in size
- [`gpg`](https://www.gnupg.org/gph/de/manual/r1023.html) can be used to encrypt files and store them in the repo if you need more space

### Hiding Secrets
Secrets are encrypted with a [libsodium sealed box](https://libsodium.gitbook.io/doc/public-key_cryptography/sealed_boxes) and are not readable once you have stored them in your repository.
When secrets would get printed to the workflow logs, GitHub attempts to hide them on a best effort basis. This helps prevent accidental leaks of your secrets, but diligent users can easily find ways to get your secrets leaked, so ensure that only trusted users have write access to your workflows when using secrets

File renamed without changes.
2 changes: 1 addition & 1 deletion docs/02.2_events.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ By specifying an event along with an activity type we can build more precise tri
```yaml
on:
project:
type: [opened, reopened]
type: [created, reopened]
```
---
Expand Down
6 changes: 0 additions & 6 deletions docs/02.6_reporting.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ Sometimes it can be useful to see extra debug output from your workflows. To do
1. Add a new secret with the name `ACTIONS_RUNNER_DEBUG` and the value `true`
1. Notice that new workflows now have extra debug output

## ⌨️ Activity: Examining workflow runs

_(~30 minutes)_

1. As a class, examine one or more workflow reports in a public repository.

---

<p class="custom-info-box">These logs are also available for download should you need to save them for any reason.</p>
4 changes: 2 additions & 2 deletions docs/03.7_using-artifacts.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Using Artifacts In Actions {docsify-ignore-all}

# Exercise 6 - Uploading and Downloading Artifacts in Actions
## Exercise 6 - Uploading and Downloading Artifacts in Actions
[exercise 6 upload and download artifacts](Exercises/06-Upload-Download-Artifacts.md ':include')

# Exercise 6 A - Uploading and Downloading Artifacts with Artifactory in Actions
## Exercise 6 A - Uploading and Downloading Artifacts with Artifactory in Actions
[exercise 6 upload and download artifacts with artifactory](Exercises/06.A-Upload-Download-Artifacts-%20from%20Artifactory.md ':include')
2 changes: 1 addition & 1 deletion docs/Exercises/02-Create-CI-Action.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,5 @@ To protect our main branch and require at least one review and a passing test, p
1. Under "Branch name pattern", type `main`.
1. Select the **Require pull request reviews before merging** checkbox.
1. Select the **Require status checks to pass before merging** checkbox.
1. Select the **Continuous Integration** checkbox in the Status checks found in the last week for this repository.
1. Search for **CI** in the Status checks found in the last week for this repository.
1. Click **Save changes**.
2 changes: 2 additions & 0 deletions docs/Exercises/02.B-Create-Context-Job.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

**GitHub Actions** store information about the job, environment, and other aspects of the jobs contexts.

See the [documentation](https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context) for context details.

Once the job runs, you will be able to see all variables of the job, and what could be available to you.
This is helpful to debug environments and see what variables are available to you.
You could then copy this code into another running workflow and see the output that is generated by that job.
Expand Down
7 changes: 5 additions & 2 deletions docs/Exercises/04-Create-CT-Actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,17 @@ The objective of *Continuous Testing* is to achieve constant feedback on your ch
##########################
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 0

################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter@v3
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -83,4 +86,4 @@ When we push a change to a branch, the GitHub Action will clone the repository c

In the pull request, you will see the GitHub Actions job running and its results. You can review the logs of the run and the steps it took by clicking on **Details** next to the GitHub Action. You can experiment with this Action, but making additional updates to the code and committing it.

1. Merge the pull request.
1. Merge the pull request.
7 changes: 4 additions & 3 deletions docs/Exercises/06-Upload-Download-Artifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
1. Add the following code to your build pipeline, and it will then start publishing the artifact once the step has completed.

1. Create a new branch called `Artifacts`
1. Copy and paste the following code snippet into one of your working workflow files:
```yaml
1. Copy and paste the following code snippet into one of your working workflow files:

```yml
# Upload an artifact to GitHub
- name: Upload Artifact to Github Build Job
uses: actions/upload-artifact@v2
Expand All @@ -26,4 +27,4 @@
### Linkage
- [Upload Artifact](https://github.com/actions/upload-artifact)
- [Download Artifact](https://github.com/actions/download-artifact)
- [Download Artifact](https://github.com/actions/download-artifact)
7 changes: 4 additions & 3 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@
- [**Exercise 3 A - Dependency Locking**](02.7_exercise_3.md?id=exercise-3-a-dependency-locking)
- [**How GitHub Uses Actions**](02.8_actions-hackathon-case-study.md)
- [**Caching Within Actions**](02.9_caching.md)
- [**Section Wrap Up**](02.10_continuous-integration.md)
- [**Section Wrap Up**](02.10_secrets.md)
- [**Section Wrap Up**](02.11_continuous-integration.md)
- [**Continuous Integration**](03.1_ci-overview.md)
- [**CI using GitHub Actions**](03.2_ci-with-actions.md)
<!-- - [How GitHub Uses Actions pt2](03.3_github-mobile-case-study.md) -->
<!-- - [WIP External Case Study](03.4_some-other-case-study.md) -->
- [**Continuous Testing With Actions**](03.5_ct-action.md)
- [**Security Scanning**](03.6_security-scan.md)
- [**Using Artifacts In Actions**](03.7_using-artifacts.md)
[**Exercise 6 - Uploading and Downloading Artifacts**](03.7_using-artifacts?id=exercise-6-uploading-and-downloading-artifacts-in-actions)
[**Exercise 6 A - Uploading and Downloading Artifacts with Artifactory**](03.7_using-artifacts?id=exercise-6-a-uploading-and-downloading-artifacts-with-artifactory-in-actions)
- [**Exercise 6 - Uploading and Downloading Artifacts**](03.7_using-artifacts?id=exercise-6-uploading-and-downloading-artifacts-in-actions)
- [**Exercise 6 A - Uploading and Downloading Artifacts with Artifactory**](03.7_using-artifacts?id=exercise-6-a-uploading-and-downloading-artifacts-with-artifactory-in-actions)
- [**Section Wrap Up**](03.8_continuous-delivery.md)
- [**Continuous Delivery/Deployment**](04.1_cd-overview.md)
<!-- - [**CD using GitHub Actions**](04.2_cd-with-actions.md) -->
Expand Down

0 comments on commit 83409d1

Please sign in to comment.