Skip to content

Commit

Permalink
removed separate repo dir
Browse files Browse the repository at this point in the history
  • Loading branch information
clay-lake committed Aug 22, 2024
1 parent 16ace63 commit 036a753
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/Test-Rock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ on:

env:
OCI_FACTORY_REPO: clay-lake/oci-factory # TODO: replace with parent repo when merging back
OCI_FACTORY_DIR: oci-factory/
OCI_FACTORY_BRANCH: refactor-workflows

TEST_IMAGE_NAME: 'test-img'
Expand All @@ -71,7 +70,6 @@ jobs:
- uses: actions/checkout@v4
with:
repository: ${{ env.OCI_FACTORY_REPO }}
path: ${{ env.OCI_FACTORY_DIR }}
ref: ${{ env.OCI_FACTORY_BRANCH }}
fetch-depth: 1

Expand Down Expand Up @@ -143,7 +141,6 @@ jobs:
- uses: actions/checkout@v4
with:
repository: ${{ env.OCI_FACTORY_REPO }}
path: ${{ env.OCI_FACTORY_DIR }}
ref: ${{ env.OCI_FACTORY_BRANCH }}
fetch-depth: 1

Expand All @@ -158,7 +155,7 @@ jobs:
- name: Configure
id: configure
run: |
${{ env.OCI_FACTORY_DIR }}/src/test-rock/test-efficiency/configure.sh \
src/test-rock/test-efficiency/configure.sh \
-d ${{ env.TEST_IMAGE_NAME }}:${{ env.TEST_IMAGE_TAG }}
Expand All @@ -175,9 +172,9 @@ jobs:
# https://github.com/yuichielectric/dive-action/issues/581
- name: Dive efficiency test
run: |
${{ env.OCI_FACTORY_DIR }}/src/test-rock/test-efficiency/dive_test.sh \
src/test-rock/test-efficiency/dive_test.sh \
-d ${{ env.TEST_IMAGE_NAME }}:${{ env.TEST_IMAGE_TAG }} \
-c "$PWD/${{ env.OCI_FACTORY_DIR }}/src/test-rock/test-efficiency/dive-ci.yaml" \
-c "$PWD/src/test-rock/test-efficiency/dive-ci.yaml" \
test-vulnerabilities:
Expand All @@ -190,7 +187,6 @@ jobs:
- uses: actions/checkout@v4
with:
repository: ${{ env.OCI_FACTORY_REPO }}
path: ${{ env.OCI_FACTORY_DIR }}
ref: ${{ env.OCI_FACTORY_BRANCH }}
fetch-depth: 1

Expand All @@ -207,7 +203,7 @@ jobs:
- name: Configure
id: configure
run: |
python3 ${{ env.OCI_FACTORY_DIR }}/src/test-rock/test-vulnerabilities/configure.py \
python3 src/test-rock/test-vulnerabilities/configure.py \
--archive-name ${{ inputs.oci-archive-name }} \
--archive-path ${{ inputs.oci-archive-name }} \
--report-suffix 'vulnerability-report.json'
Expand Down Expand Up @@ -247,7 +243,7 @@ jobs:

- name: Generate Report
run: |
python3 ${{ env.OCI_FACTORY_DIR }}/src/test-rock/test-vulnerabilities/report.py \
python3 src/test-rock/test-vulnerabilities/report.py \
--report-path '${{ steps.configure.outputs.report-name }}' \
--last-scan '${{ inputs.date-last-scan }}' >> $GITHUB_STEP_SUMMARY
Expand All @@ -263,7 +259,6 @@ jobs:
- uses: actions/checkout@v4
with:
repository: ${{ env.OCI_FACTORY_REPO }}
path: ${{ env.OCI_FACTORY_DIR }}
ref: ${{ env.OCI_FACTORY_BRANCH }}
fetch-depth: 1

Expand All @@ -273,7 +268,7 @@ jobs:
with:
python-version: "3.10"

- run: pip install -r ${{ env.OCI_FACTORY_DIR }}/src/test-rock/test-malware/requirements.txt
- run: pip install -r src/test-rock/test-malware/requirements.txt


- uses: actions/cache/restore@v4
Expand All @@ -289,15 +284,14 @@ jobs:
--image ${{ env.TEST_IMAGE_NAME }}:${{ env.TEST_IMAGE_TAG }} bundle
# TODO: configure make global report name
${{ env.OCI_FACTORY_DIR }}/src/test-rock/test-malware/malware_scan.py \
src/test-rock/test-malware/malware_scan.py \
--filesystem bundle/rootfs \
--scan-output ./${{ inputs.oci-archive-name }}.malware_test.txt
- name: Report
id: report
- name: Generate Report
run: |
${{ env.OCI_FACTORY_DIR }}/src/test-rock/test-malware/report_malware_scan.py \
src/test-rock/test-malware/report_malware_scan.py \
--scan-input ./${{ inputs.oci-archive-name }}.malware_test.txt >> $GITHUB_STEP_SUMMARY
Expand Down

0 comments on commit 036a753

Please sign in to comment.