Skip to content

Commit

Permalink
Use shared check-file action
Browse files Browse the repository at this point in the history
  • Loading branch information
heiskr committed May 31, 2023
1 parent 6d6afff commit 12cb944
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 53 deletions.
42 changes: 0 additions & 42 deletions .github/script/check-file.sh

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/1-configure-label-based-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ jobs:

# Verify the learner added the specific label triggers.
- name: Verify workflow
run: ./.github/script/check-file.sh
env:
FILE: .github/workflows/deploy-staging.yml
SEARCH: "github.event.pull_request.labels\\.\\*.name.*stage"
uses: skills/action-check-file@v1
with:
file: .github/workflows/deploy-staging.yml
search: "github.event.pull_request.labels\\.\\*.name.*stage"

# In README.md, switch step 1 for step 2.
- name: Update to step 2
Expand Down
44 changes: 37 additions & 7 deletions .github/workflows/2-setup-azure-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,47 @@ jobs:

# Verify the learner configured Build-Docker-Image job.
- name: Verify Build-Docker-Image job
run: .github/script/check-file.sh
env:
FILE: .github/workflows/deploy-staging.yml
SEARCH_LIST: "Build-Docker-Image actions/download-artifact docker/login-action docker/build-push-action"
uses: skills/action-check-file@v1
with:
file: .github/workflows/deploy-staging.yml
search: "Build-Docker-Image"

- name: Verify Build-Docker-Image job
uses: skills/action-check-file@v1
with:
file: .github/workflows/deploy-staging.yml
search: "actions/download-artifact"

- name: Verify Build-Docker-Image job
uses: skills/action-check-file@v1
with:
file: .github/workflows/deploy-staging.yml
search: "docker/login-action"

- name: Verify Build-Docker-Image job
uses: skills/action-check-file@v1
with:
file: .github/workflows/deploy-staging.yml
search: "docker/build-push-action"

# Verify the learner configured the Deploy-to-Azure job.
- name: Verify Deploy-to-Azure job
run: .github/script/check-file.sh
uses: skills/action-check-file@v1
env:
file: .github/workflows/deploy-staging.yml
search: "Deploy-to-Azure"

- name: Verify Deploy-to-Azure job
uses: skills/action-check-file@v1
env:
file: .github/workflows/deploy-staging.yml
search: "azure/login"

- name: Verify Deploy-to-Azure job
uses: skills/action-check-file@v1
env:
FILE: .github/workflows/deploy-staging.yml
SEARCH_LIST: "Deploy-to-Azure azure/login azure/webapps-deploy"
file: .github/workflows/deploy-staging.yml
search: "azure/webapps-deploy"

# Merge the pull open pull request.
- name: Merge Pull Request
Expand Down

0 comments on commit 12cb944

Please sign in to comment.