1
1
name : Step 4, 4-Personalize your Codespace
2
+
2
3
# This step triggers after TBD-step-4-event-desc
3
4
# This step sets STEP to X
4
- # This step closes <details id=3 > and opens <details X>
5
+ # This step closes <details id=4 > and opens <details X>
5
6
6
7
# This will run every time we TBD-step-4-event-desc
7
8
# Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
11
12
branches :
12
13
- main
13
14
paths :
14
- - ' .github/dependabot.yml '
15
-
15
+ - ' setup.sh '
16
+
16
17
# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
17
18
permissions :
18
19
# Need `contents: read` to checkout the repository
19
20
# Need `contents: write` to update the step metadata
20
21
contents : write
21
22
22
23
jobs :
23
- # The purpose of this job is to output the current step number
24
- # (retreived from the STEP file). This output variable can
25
- # then be referenced in other jobs and used in conditional
26
- # expressions.
24
+ # Get the current step from .github/script/STEP so we can
25
+ # limit running the main job when the learner is on the same step.
27
26
get_current_step :
28
27
name : Check current step number
29
28
runs-on : ubuntu-latest
30
29
steps :
31
30
- name : Checkout
32
- uses : actions/checkout@v2
31
+ uses : actions/checkout@v3
33
32
- id : get_step
34
- run : echo "::set-output name=current_step::$(cat ./.github/script/STEP)"
33
+ run : |
34
+ echo "current_step=$(cat ./.github/script/STEP)" >> $GITHUB_OUTPUT
35
35
outputs :
36
36
current_step : ${{ steps.get_step.outputs.current_step }}
37
-
37
+
38
38
on_TBD-step-4-event :
39
39
name : On TBD-step-4-event
40
40
needs : get_current_step
41
41
42
42
# We will only run this action when:
43
43
# 1. This repository isn't the template repository
44
+ # 2. The STEP is currently 4
44
45
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts
45
46
# 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}}
47
+ if : >-
48
+ ${{ !github.event.repository.is_template
49
+ && needs.get_current_step.outputs.current_step == 4}}
47
50
48
51
# We'll run Ubuntu for performance instead of Mac or Windows
49
52
runs-on : ubuntu-latest
50
53
51
54
steps :
52
55
# We'll need to check out the repository so that we can edit the README
53
56
- name : Checkout
54
- uses : actions/checkout@v2
57
+ uses : actions/checkout@v3
55
58
with :
56
59
fetch-depth : 0 # Let's get all the branches
57
60
@@ -61,10 +64,10 @@ jobs:
61
64
chmod a+x .github/script/check-file.sh
62
65
./.github/script/check-file.sh
63
66
env :
64
- FILE : " dotfiles/ setup.sh"
65
- SEARCH : " Codespace "
66
-
67
- # Update README to close <details id=3 > and open <details id=X>
67
+ FILE : " setup.sh"
68
+ SEARCH : " install sl "
69
+
70
+ # Update README to close <details id=4 > and open <details id=X>
68
71
# and set STEP to 'X'
69
72
- name : Update to step X
70
73
uses : skills/action-update-step@v1
0 commit comments