11name : Step 4, 4-Personalize your Codespace
2+
23# This step triggers after TBD-step-4-event-desc
34# 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>
56
67# This will run every time we TBD-step-4-event-desc
78# Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
1112 branches :
1213 - main
1314 paths :
14- - ' .github/dependabot.yml '
15-
15+ - ' setup.sh '
16+
1617# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
1718permissions :
1819 # Need `contents: read` to checkout the repository
1920 # Need `contents: write` to update the step metadata
2021 contents : write
2122
2223jobs :
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.
2726 get_current_step :
2827 name : Check current step number
2928 runs-on : ubuntu-latest
3029 steps :
3130 - name : Checkout
32- uses : actions/checkout@v2
31+ uses : actions/checkout@v3
3332 - 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
3535 outputs :
3636 current_step : ${{ steps.get_step.outputs.current_step }}
37-
37+
3838 on_TBD-step-4-event :
3939 name : On TBD-step-4-event
4040 needs : get_current_step
4141
4242 # We will only run this action when:
4343 # 1. This repository isn't the template repository
44+ # 2. The STEP is currently 4
4445 # Reference https://docs.github.com/en/actions/learn-github-actions/contexts
4546 # 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}}
4750
4851 # We'll run Ubuntu for performance instead of Mac or Windows
4952 runs-on : ubuntu-latest
5053
5154 steps :
5255 # We'll need to check out the repository so that we can edit the README
5356 - name : Checkout
54- uses : actions/checkout@v2
57+ uses : actions/checkout@v3
5558 with :
5659 fetch-depth : 0 # Let's get all the branches
5760
@@ -61,10 +64,10 @@ jobs:
6164 chmod a+x .github/script/check-file.sh
6265 ./.github/script/check-file.sh
6366 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>
6871 # and set STEP to 'X'
6972 - name : Update to step X
7073 uses : skills/action-update-step@v1
0 commit comments