Skip to content

Commit e805d67

Browse files
authored
Updates to match template (#6)
* Updates to match template * Add or update get current step jobs * Update job conditional to include current step * Update README.md * Update README.md
1 parent 3b0e050 commit e805d67

File tree

6 files changed

+55
-18
lines changed

6 files changed

+55
-18
lines changed

.github/workflows/0-start.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ jobs:
2424
- name: Checkout
2525
uses: actions/checkout@v3
2626
- id: get_step
27-
run: echo "::set-output name=current_step::$(cat ./.github/script/STEP)"
27+
run: |
28+
echo "current_step=$(cat ./.github/script/STEP)" >> $GITHUB_OUTPUT
2829
outputs:
2930
current_step: ${{ steps.get_step.outputs.current_step }}
3031

@@ -34,9 +35,12 @@ jobs:
3435

3536
# We will only run this action when:
3637
# 1. This repository isn't the template repository
38+
# 2. The STEP is currently 0
3739
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts
3840
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions
39-
if: ${{ !github.event.repository.is_template && needs.get_current_step.outputs.current_step == 0}}
41+
if: >-
42+
${{ !github.event.repository.is_template
43+
&& needs.get_current_step.outputs.current_step == 0 }}
4044
4145
# We'll run Ubuntu for performance instead of Mac or Windows
4246
runs-on: ubuntu-latest

.github/workflows/1-dependency-graph.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ jobs:
3030
- name: Checkout
3131
uses: actions/checkout@v3
3232
- id: get_step
33-
run: echo "::set-output name=current_step::$(cat ./.github/script/STEP)"
33+
run: |
34+
echo "current_step=$(cat ./.github/script/STEP)" >> $GITHUB_OUTPUT
3435
outputs:
3536
current_step: ${{ steps.get_step.outputs.current_step }}
3637

@@ -40,9 +41,12 @@ jobs:
4041

4142
# We will only run this action when:
4243
# 1. This repository isn't the template repository
44+
# 2. The STEP is currently 0
4345
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts
4446
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions
45-
if: ${{ !github.event.repository.is_template && needs.get_current_step.outputs.current_step == 1 }}
47+
if: >-
48+
${{ !github.event.repository.is_template
49+
&& needs.get_current_step.outputs.current_step == 1 }}
4650
4751
# We'll run Ubuntu for performance instead of Mac or Windows
4852
runs-on: ubuntu-latest

.github/workflows/2-dependabot-alerts.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ jobs:
3030
- name: Checkout
3131
uses: actions/checkout@v3
3232
- id: get_step
33-
run: echo "::set-output name=current_step::$(cat ./.github/script/STEP)"
33+
run: |
34+
echo "current_step=$(cat ./.github/script/STEP)" >> $GITHUB_OUTPUT
3435
outputs:
3536
current_step: ${{ steps.get_step.outputs.current_step }}
3637

@@ -40,9 +41,12 @@ jobs:
4041

4142
# We will only run this action when:
4243
# 1. This repository isn't the template repository
44+
# 2. The STEP is currently 2
4345
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts
4446
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions
45-
if: ${{ !github.event.repository.is_template && needs.get_current_step.outputs.current_step == 2 }}
47+
if: >-
48+
${{ !github.event.repository.is_template
49+
&& needs.get_current_step.outputs.current_step == 2 }}
4650
4751
# We'll run Ubuntu for performance instead of Mac or Windows
4852
runs-on: ubuntu-latest

.github/workflows/3-dependabot-security.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ jobs:
3030
- name: Checkout
3131
uses: actions/checkout@v3
3232
- id: get_step
33-
run: echo "::set-output name=current_step::$(cat ./.github/script/STEP)"
33+
run: |
34+
echo "current_step=$(cat ./.github/script/STEP)" >> $GITHUB_OUTPUT
3435
outputs:
3536
current_step: ${{ steps.get_step.outputs.current_step }}
3637

@@ -40,9 +41,12 @@ jobs:
4041

4142
# We will only run this action when:
4243
# 1. This repository isn't the template repository
44+
# 2. The STEP is currently 3
4345
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts
4446
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions
45-
if: ${{ !github.event.repository.is_template && needs.get_current_step.outputs.current_step == 3 }}
47+
if: >-
48+
${{ !github.event.repository.is_template
49+
&& needs.get_current_step.outputs.current_step == 3 }}
4650
4751
# We'll run Ubuntu for performance instead of Mac or Windows
4852
runs-on: ubuntu-latest

.github/workflows/4-dependabot-versions.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ jobs:
3131
- name: Checkout
3232
uses: actions/checkout@v3
3333
- id: get_step
34-
run: echo "::set-output name=current_step::$(cat ./.github/script/STEP)"
34+
run: |
35+
echo "current_step=$(cat ./.github/script/STEP)" >> $GITHUB_OUTPUT
3536
outputs:
3637
current_step: ${{ steps.get_step.outputs.current_step }}
3738

@@ -41,9 +42,12 @@ jobs:
4142

4243
# We will only run this action when:
4344
# 1. This repository isn't the template repository
45+
# 2. The STEP is currently 4
4446
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts
4547
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions
46-
if: ${{ !github.event.repository.is_template && needs.get_current_step.outputs.current_step == 4}}
48+
if: >-
49+
${{ !github.event.repository.is_template
50+
&& needs.get_current_step.outputs.current_step == 4 }}
4751
4852
# We'll run Ubuntu for performance instead of Mac or Windows
4953
runs-on: ubuntu-latest

README.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
1+
<!--
2+
<<< Author notes: Header of the course >>>
3+
Include a 1280×640 image, course title in sentence case, and a concise description in emphasis.
4+
In your repository settings: enable template repository, add your 1280×640 social image, auto delete head branches.
5+
Add your open source license, GitHub uses Creative Commons Attribution 4.0 International.
6+
-->
7+
18
# Secure your repository's supply chain
29

3-
<!--step0-->
10+
<!--
11+
<<< Author notes: Start of the course >>>
12+
Include start button, a note about Actions minutes,
13+
and tell the learner why they should take the course.
14+
Each step should be wrapped in <details>/<summary>, with an `id` set.
15+
The start <details> should have `open` as well.
16+
Do not use quotes on the <details> tag attributes.
17+
-->
18+
19+
<details id=0 open>
20+
<summary><h2>Welcome</h2></summary>
421

522
GitHub helps you secure your supply chain, from understanding the dependencies in your environment, to knowing about vulnerabilities in those dependencies and patching them.
623

@@ -10,17 +27,17 @@ GitHub helps you secure your supply chain, from understanding the dependencies i
1027
- **Prerequisites**: None
1128
- **Timing**: This course is four steps long and can be completed in under an hour
1229

13-
<summary><h2> How to start this course!</h2></summary>
14-
15-
1. Above these instructions, right-click **Use this template** and open the link in a new tab.
16-
![Use this template](https://user-images.githubusercontent.com/1221423/169618716-fb17528d-f332-4fc5-a11a-eaa23562665e.png)
30+
## How to start this course
31+
32+
1. Right-click **Start course** and open the link in a new tab.
33+
<br />[![start-course](https://user-images.githubusercontent.com/1221423/218596841-0645fe1a-4aaf-4f51-9ab3-8aa2d3fdd487.svg)](https://github.com/skills/secure-repository-supply-chain/generate)
1734
2. In the new tab, follow the prompts to create a new repository.
1835
- For owner, choose your personal account or an organization to host the repository.
19-
- We recommend creating a public repository—private repositories will use [Actions minutes](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions).
20-
![Create a new repository](https://user-images.githubusercontent.com/1221423/169618722-406dc508-add4-4074-83f0-c7a7ad87f6f3.png)
36+
- We recommend creating a public repository—private repositories will [use Actions minutes](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions).
37+
![Create a new repository](https://user-images.githubusercontent.com/1221423/218594143-e60462b6-9f2a-4fa3-80de-063ac5429aab.png)
2138
3. After your new repository is created, wait about 20 seconds, then refresh the page. Follow the step-by-step instructions in the new repository's README.
2239

23-
<!--endstep0-->
40+
</details>
2441

2542
<details id=1>
2643
<summary><h2>Step 1: Review and add dependencies using dependency graph</h2></summary>

0 commit comments

Comments
 (0)