Skip to content

Commit 28b1ba6

Browse files
committed
Update "update-step"
1 parent afb2726 commit 28b1ba6

File tree

6 files changed

+54
-61
lines changed

6 files changed

+54
-61
lines changed

.github/workflows/0-start.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
branches:
1313
- main
1414

15+
# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
1516
permissions:
1617
# Need `contents: read` to checkout the repository
1718
# Need `contents: write` to update the step metadata
@@ -25,8 +26,7 @@ jobs:
2526
# 1. This repository isn't the template repository
2627
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts
2728
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions
28-
if: ${{ github.repository_owner != 'githublearn' }}
29-
# TBD replace `githublearn` with your organization name, if applicable
29+
if: ${{ !github.event.repository.is_template }}
3030

3131
# We'll run Ubuntu for performance instead of Mac or Windows
3232
runs-on: ubuntu-latest
@@ -40,14 +40,12 @@ jobs:
4040

4141
# TBD-course-set-up
4242

43-
# Update README to close <details id=0>
44-
# and open <details id=1>
43+
# Update README to close <details id=0> and open <details id=1>
4544
# and set STEP to '1'
4645
- name: Update to step 1
47-
uses: githublearn/action-update-step@v1.0.2
48-
env:
49-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50-
GITHUB_REPOSITORY: ${{ env.GITHUB_REPOSITORY }}
51-
FROM_STEP: 0
52-
TO_STEP: 1
53-
BRANCH_NAME: TBD-branch-name
46+
uses: githublearn/action-update-step@v1
47+
with:
48+
token: ${{ secrets.GITHUB_TOKEN }}
49+
from_step: 0
50+
to_step: 1
51+
branch_name: tbd-branch-name

.github/workflows/1-tbd.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
workflow_dispatch:
1111
TBD-step-1-event:
1212

13+
# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
1314
permissions:
1415
# Need `contents: read` to checkout the repository
1516
# Need `contents: write` to update the step metadata
@@ -23,7 +24,7 @@ jobs:
2324
# 1. This repository isn't the template repository
2425
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts
2526
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions
26-
if: ${{ github.repository_owner != 'TBD-organization' }}
27+
if: ${{ !github.event.repository.is_template }}
2728

2829
# We'll run Ubuntu for performance instead of Mac or Windows
2930
runs-on: ubuntu-latest
@@ -37,14 +38,12 @@ jobs:
3738

3839
# TBD-step-1-additional-steps
3940

40-
# Update README to close <details id=1>
41-
# and open <details id=2>
41+
# Update README to close <details id=1> and open <details id=2>
4242
# and set STEP to '2'
4343
- name: Update to step 2
44-
uses: githublearn/action-update-step@v1.0.2
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
GITHUB_REPOSITORY: ${{ env.GITHUB_REPOSITORY }}
48-
FROM_STEP: 1
49-
TO_STEP: 2
50-
BRANCH_NAME: TBD-branch-name
44+
uses: githublearn/action-update-step@v1
45+
with:
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
from_step: 1
48+
to_step: 2
49+
branch_name: tbd-branch-name

.github/workflows/2-tbd.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
workflow_dispatch:
1111
TBD-step-2-event:
1212

13+
# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
1314
permissions:
1415
# Need `contents: read` to checkout the repository
1516
# Need `contents: write` to update the step metadata
@@ -23,7 +24,7 @@ jobs:
2324
# 1. This repository isn't the template repository
2425
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts
2526
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions
26-
if: ${{ github.repository_owner != 'TBD-organization' }}
27+
if: ${{ !github.event.repository.is_template }}
2728

2829
# We'll run Ubuntu for performance instead of Mac or Windows
2930
runs-on: ubuntu-latest
@@ -37,14 +38,12 @@ jobs:
3738

3839
# TBD-step-2-additional-steps
3940

40-
# Update README to close <details id=2>
41-
# and open <details id=3>
41+
# Update README to close <details id=2> and open <details id=3>
4242
# and set STEP to '3'
4343
- name: Update to step 3
44-
uses: githublearn/action-update-step@v1.0.2
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
GITHUB_REPOSITORY: ${{ env.GITHUB_REPOSITORY }}
48-
FROM_STEP: 2
49-
TO_STEP: 3
50-
BRANCH_NAME: TBD-branch-name
44+
uses: githublearn/action-update-step@v1
45+
with:
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
from_step: 2
48+
to_step: 3
49+
branch_name: tbd-branch-name

.github/workflows/3-tbd.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
workflow_dispatch:
1111
TBD-step-3-event:
1212

13+
# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
1314
permissions:
1415
# Need `contents: read` to checkout the repository
1516
# Need `contents: write` to update the step metadata
@@ -23,7 +24,7 @@ jobs:
2324
# 1. This repository isn't the template repository
2425
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts
2526
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions
26-
if: ${{ github.repository_owner != 'TBD-organization' }}
27+
if: ${{ !github.event.repository.is_template }}
2728

2829
# We'll run Ubuntu for performance instead of Mac or Windows
2930
runs-on: ubuntu-latest
@@ -37,14 +38,12 @@ jobs:
3738

3839
# TBD-step-3-additional-steps
3940

40-
# Update README to close <details id=3>
41-
# and open <details id=4>
41+
# Update README to close <details id=3> and open <details id=4>
4242
# and set STEP to '4'
4343
- name: Update to step 4
44-
uses: githublearn/action-update-step@v1.0.2
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
GITHUB_REPOSITORY: ${{ env.GITHUB_REPOSITORY }}
48-
FROM_STEP: 3
49-
TO_STEP: 4
50-
BRANCH_NAME: TBD-branch-name
44+
uses: githublearn/action-update-step@v1
45+
with:
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
from_step: 3
48+
to_step: 4
49+
branch_name: tbd-branch-name

.github/workflows/4-tbd.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
workflow_dispatch:
1111
TBD-step-4-event:
1212

13+
# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
1314
permissions:
1415
# Need `contents: read` to checkout the repository
1516
# Need `contents: write` to update the step metadata
@@ -23,7 +24,7 @@ jobs:
2324
# 1. This repository isn't the template repository
2425
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts
2526
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions
26-
if: ${{ github.repository_owner != 'TBD-organization' }}
27+
if: ${{ !github.event.repository.is_template }}
2728

2829
# We'll run Ubuntu for performance instead of Mac or Windows
2930
runs-on: ubuntu-latest
@@ -37,14 +38,12 @@ jobs:
3738

3839
# TBD-step-4-additional-steps
3940

40-
# Update README to close <details id=4>
41-
# and open <details id=5>
41+
# Update README to close <details id=4> and open <details id=5>
4242
# and set STEP to '5'
4343
- name: Update to step 5
44-
uses: githublearn/action-update-step@v1.0.2
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
GITHUB_REPOSITORY: ${{ env.GITHUB_REPOSITORY }}
48-
FROM_STEP: 4
49-
TO_STEP: 5
50-
BRANCH_NAME: TBD-branch-name
44+
uses: githublearn/action-update-step@v1
45+
with:
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
from_step: 4
48+
to_step: 5
49+
branch_name: tbd-branch-name

.github/workflows/5-merge-your-pull-request.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
branches:
1313
- main
1414

15+
# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
1516
permissions:
1617
# Need `contents: read` to checkout the repository
1718
# Need `contents: write` to update the step metadata
@@ -25,7 +26,7 @@ jobs:
2526
# 1. This repository isn't the template repository
2627
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts
2728
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions
28-
if: ${{ github.repository_owner != 'githublearn' }}
29+
if: ${{ !github.event.repository.is_template }}
2930
# TBD replace `githublearn` with your organization name, if applicable
3031

3132
# We'll run Ubuntu for performance instead of Mac or Windows
@@ -38,14 +39,12 @@ jobs:
3839
with:
3940
fetch-depth: 0 # Let's get all the branches
4041

41-
# Update README to close <details id=5>
42-
# and open <details id=X>
42+
# Update README to close <details id=5> and open <details id=X>
4343
# and set STEP to 'X'
4444
- name: Update to step X
45-
uses: githublearn/action-update-step@v1.0.2
46-
env:
47-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48-
GITHUB_REPOSITORY: ${{ env.GITHUB_REPOSITORY }}
49-
FROM_STEP: 5
50-
TO_STEP: X
51-
BRANCH_NAME: TBD-branch-name
45+
uses: githublearn/action-update-step@v1
46+
with:
47+
token: ${{ secrets.GITHUB_TOKEN }}
48+
from_step: 5
49+
to_step: X
50+
branch_name: tbd-branch-name

0 commit comments

Comments
 (0)