Skip to content

Commit f031090

Browse files
committed
Use shared check-file action
1 parent 68903b8 commit f031090

File tree

5 files changed

+16
-41
lines changed

5 files changed

+16
-41
lines changed

.github/script/check-file.sh

-17
This file was deleted.

.github/workflows/1-first-codespace.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,10 @@ jobs:
5656

5757
# Verify the learner added the file contents
5858
- name: Check workflow contents, jobs
59-
run: |
60-
chmod a+x .github/script/check-file.sh
61-
./.github/script/check-file.sh
62-
env:
63-
FILE: "index.html"
64-
SEARCH: "Hello from the codespace"
59+
uses: skills/action-check-file@v1
60+
with:
61+
file: "index.html"
62+
search: "Hello from the codespace"
6563

6664
# In README.md, switch step 1 for step 2.
6765
- name: Update to step 2

.github/workflows/2-custom-image.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,10 @@ jobs:
5656

5757
# Verify the devcontainer.json has an image.
5858
- name: Check devcontainer.json
59-
run: |
60-
chmod a+x .github/script/check-file.sh
61-
./.github/script/check-file.sh
62-
env:
63-
FILE: ".devcontainer/devcontainer.json"
64-
SEARCH: "mcr.microsoft.com/vscode/devcontainers/universal:latest"
59+
uses: skills/action-check-file@v1
60+
with:
61+
file: ".devcontainer/devcontainer.json"
62+
search: "mcr.microsoft.com/vscode/devcontainers/universal:latest"
6563

6664
# In README.md, switch step 2 for step 3.
6765
- name: Update to step 3

.github/workflows/3-customize-codespace.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,10 @@ jobs:
5656

5757
# Verify the postCreateCommand was added.
5858
- name: Check for postCreateCommand
59-
run: |
60-
chmod a+x .github/script/check-file.sh
61-
./.github/script/check-file.sh
62-
env:
63-
FILE: ".devcontainer/devcontainer.json"
64-
SEARCH: "postCreateCommand"
59+
uses: skills/action-check-file@v1
60+
with:
61+
file: ".devcontainer/devcontainer.json"
62+
search: "postCreateCommand"
6563

6664
# In README.md, switch step 3 for step 4.
6765
- name: Update to step 4

.github/workflows/4-personalize-codespace.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,10 @@ jobs:
5858

5959
# Verify the setup.sh added the file contents.
6060
- name: Check workflow contents, jobs
61-
run: |
62-
chmod a+x .github/script/check-file.sh
63-
./.github/script/check-file.sh
64-
env:
65-
FILE: "setup.sh"
66-
SEARCH: "install sl"
61+
uses: skills/action-check-file@v1
62+
with:
63+
file: "setup.sh"
64+
search: "install sl"
6765

6866
# In README.md, switch step 4 for step X.
6967
- name: Update to step X

0 commit comments

Comments
 (0)