Skip to content

Commit

Permalink
Edits to move files in to the website
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris McIntosh committed Jun 14, 2021
1 parent 0a71255 commit 7c1eef4
Show file tree
Hide file tree
Showing 44 changed files with 176 additions and 520 deletions.
3 changes: 2 additions & 1 deletion docs/01.1_actions-about.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ GitHub Actions allow you to:
- Get email notifications about workflow runs

### Exercise 1 - Creating the Dockerfile
[Start Exercise 1](../Exercises/01-Create-Dockerfile.md)
- 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

7 changes: 1 addition & 6 deletions docs/01.4_actions-hello.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,4 @@ We have put together an actions learning experience like no other. Through a ser
- How other organizations have used GitHub Actions
- Cheat sheet reference materials

## ⌨️ Activity: Access the Learning Path

_(~30 minutes)_

1. Head over to the [**DevOps with GitHub Actions Learning Path**](https://lab.github.com/githubtraining/paths/devops-with-github-actions)
1. Course 1: [**GitHub Actions: Hello World**](https://lab.github.com/githubtraining/github-actions:-hello-world)
Head over to the [**DevOps with GitHub Actions Learning Path**](https://lab.github.com/githubtraining/paths/devops-with-github-actions)
15 changes: 15 additions & 0 deletions docs/01.5_exercise-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Your First Action {docsify-ignore-all}
# Exercise 2 - A Basic CI Action

[exercise-2](Exercises/02-Create-CI-Action.md ':include')


# Exercise 2 A - Protected Branches
[exercise2-a](Exercises/02.A-Create-QA-Branch.md ':include')

# Exercise 2 B - Actions Context
[exercise2-b](Exercises/02.B-Create-Context-Job.md ':include')

# Exercise 2 C - Manual Jobs
[exercise2-c](Exercises/02.C-Create-Manual-Job.md ':include')

File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions docs/02.7_exercise_3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Updating Depenencies {docsify-ignore-all}
# Exercise 3 - Dependabot
[exercise-3](Exercises/03-Create-Dependabot-Config.md ':include')

# Exercise 3 A - Dependency Locking
[exercise-3](Exercises/03.A-Lock-Dependencies.md ':include')

File renamed without changes.
26 changes: 0 additions & 26 deletions docs/02.8_actions-workflow-basics.md

This file was deleted.

22 changes: 22 additions & 0 deletions docs/02.9_caching.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Caching with Actions {docsify-ignore-all}

Sometimes our workflows require us to pull down a large number of dependencies. As the time to download these dependencies goes up we can think about [caching them close to the Actions Runners](https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows) to speed up your run time.

Take a look at [`actions/cache`](https://github.com/actions/cache) for samples
Sample Maven Workflow:

```
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
```

Things to keep in mind about caching on GitHub.com
- 5GB Max cache size per repository
- 7 Day data retention
- Scoped to key and branch
- Avoid caching sensitive data
14 changes: 0 additions & 14 deletions docs/03.5_ci-learning-path.md

This file was deleted.

4 changes: 4 additions & 0 deletions docs/03.5_ct-action.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Continuous Testing With Actions {docsify-ignore-all}

# Exercise 4 - Creating a basic Continuous Testing Action
[continuous testing exercise](Exercises/04-Create-CT-Actions.md ':include')
4 changes: 4 additions & 0 deletions docs/03.6_security-scan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Security Scanning {docsify-ignore-all}

# Exercise 5 - Creating GitHub Security Scan Actions
[exercise 5 security scan](Exercises/05-Create-Security-Scan.md ':include')
7 changes: 7 additions & 0 deletions docs/03.7_using-artifacts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Using Artifacts In Actions {docsify-ignore-all}

# 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 upload and download artifacts with artifactory](Exercises/06.A-Upload-Download-Artifacts-%20from%20Artifactory.md ':include')
File renamed without changes.
9 changes: 9 additions & 0 deletions docs/04.5_cd-action.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Create Continuous Delivery Actions {docsify-ignore-all}
# Exercise 7 - Create CD Actions
[exercise 7](Exercises/07-Create-CD-Actions.md ':include')

# Exercise 7 A - Deploy on push to `master` or `main`
[exercise 7](Exercises/07.A-Deploy-Prod.md ':include')

# Exercise 7 B - Deploy a Release
[exercise 7](Exercises/07.B-Deploy-Release.md ':include')
34 changes: 0 additions & 34 deletions docs/04.5_cd-learning-path.md

This file was deleted.

13 changes: 13 additions & 0 deletions docs/04.6_exercise-8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## GitHub Script Actions {docsify-ignore-all}

# Exercise 8 A - GitHub Script
[exercise 8 a](Exercises/08.A-GitHub-Script-Actions.md ':include')

# Exercise 8 B - Deployment API
[exercise 8 b](Exercises/08.B-Add-Deployment-API.md ':include')

# Exercise 8 C - Wait For Step
[exercise 8 c](Exercises/08.C-Add-Wait-For-Steps.md ':include')

# Exercise 8 D - Splitting Jobs
[exercise 8 d](Exercises/08.D-Split-Jobs-for-Speed.md ':include')
File renamed without changes.
58 changes: 58 additions & 0 deletions docs/05.2_action-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
## Action Types {docsify-ignore-all}
GitHub Actions are open source repositories written in a [variety of languages](https://docs.github.com/en/actions/creating-actions/about-actions).

### [Docker Actions](https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action)
Actions can be written with Dockerfiles so you can utilize any language and environment that your step needs.
Sample `action.yml` for a Docker action:

```
# action.yml
name: 'Hello World'
description: 'Greet someone and record the time'
inputs:
who-to-greet: # id of input
description: 'Who to greet'
required: true
default: 'World'
outputs:
time: # id of output
description: 'The time we greeted you'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.who-to-greet }}
```

### [Node Actions](https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action)
Traditional Actions are written in Node. They can utilize any language that can compile in to Javascript, so many of them are written in Typescript and compiled into a `index.js` file.
GitHub provides [helper libraries](https://github.com/actions/toolkit) that allow you to interact with the Actions context and the GitHub API easily.

### [Composite Actions](https://docs.github.com/en/actions/creating-actions/creating-a-composite-run-steps-action)
Finally you can now write Shell scripts and treat them like actions.
Sample `action.yml`:

```
name: 'Hello World'
description: 'Greet someone'
inputs:
who-to-greet: # id of input
description: 'Who to greet'
required: true
default: 'World'
outputs:
random-number:
description: "Random number"
value: ${{ steps.random-number-generator.outputs.random-id }}
runs:
using: "composite"
steps:
- run: echo Hello ${{ inputs.who-to-greet }}.
shell: bash
- id: random-number-generator
run: echo "::set-output name=random-id::$(echo $RANDOM)"
shell: bash
- run: ${{ github.action_path }}/goodbye.sh
shell: bash
```

Loading

0 comments on commit 7c1eef4

Please sign in to comment.