-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
92 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
quiet: true | ||
skip-check: | ||
# Our containers are for testing purposes only | ||
- CKV_DOCKER_2 # "Ensure that HEALTHCHECK instructions have been added to container images" | ||
- CKV_DOCKER_3 # "Ensure that a user for the container has been created" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
Laven | ||
ltsc | ||
nanoserver | ||
npmpackagejsonlintignore | ||
trivyignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,21 +74,38 @@ jobs: | |
comment_mode: off | ||
save-cache: | ||
name: Save Cache | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-22.04 | ||
- windows-2022 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Check out repository. | ||
uses: actions/[email protected] | ||
- name: Save Docker images. | ||
uses: ./ | ||
with: | ||
key: docker-cache-test-${{ github.run_id }}-${{ github.run_attempt }} | ||
key: docker-cache-test-${{ matrix.os }}-${{ github.run_id }}-${{ github.run_attempt }} | ||
- name: Build an empty test Docker image. | ||
run: docker build --tag empty . | ||
run: | | ||
if [[ "${{ matrix.os }}" =~ 'windows' ]]; then | ||
DOCKERFILE='Dockerfile.windows' | ||
else | ||
DOCKERFILE='Dockerfile' | ||
fi | ||
docker build --tag empty . --file "$DOCKERFILE" | ||
shell: bash | ||
restore-cache: | ||
name: Restore Cache | ||
needs: | ||
- save-cache | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-22.04 | ||
- windows-2022 | ||
runs-on: ${{ matrix.os }} | ||
permissions: | ||
actions: write # for cache deletion | ||
steps: | ||
|
@@ -97,11 +114,12 @@ jobs: | |
- name: Load Docker images. | ||
uses: ./ | ||
with: | ||
key: docker-cache-test-${{ github.run_id }}-${{ github.run_attempt }} | ||
key: docker-cache-test-${{ matrix.os }}-${{github.run_id }}-${{ github.run_attempt }} | ||
- name: Verify Docker loaded empty image from cache. | ||
run: | | ||
description="$(docker inspect --format '{{ index .Config.Labels "description" }}' empty)" | ||
[[ $description == 'empty image' ]] | ||
shell: bash | ||
- name: Delete test cache if permitted (i.e., workflow not triggered from fork). | ||
if: always() | ||
run: > | ||
|
@@ -118,6 +136,7 @@ jobs: | |
github.run_attempt | ||
}}&ref=$GITHUB_REF" || | ||
(( $? == 22 )) | ||
shell: bash | ||
notify: | ||
name: Notify | ||
if: always() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# for testing purposes | ||
|
||
FROM mcr.microsoft.com/windows/nanoserver:ltsc2022 | ||
LABEL description="empty image" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters