From e720887851d02e537774b71eb219ccc4aae12875 Mon Sep 17 00:00:00 2001 From: bilals12 Date: Thu, 28 Nov 2024 09:41:14 -0500 Subject: [PATCH] feat: add optional skip-checkout input to container-scan action --- .pre-commit-config.yaml | 2 +- container-scan/README.md | 6 ++++++ container-scan/action.yaml | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b0ca6c5..cfc60ef 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: rev: v3.1.0 hooks: - id: prettier - stages: [commit] + stages: [pre-commit] - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 # Use the ref you want to point at hooks: diff --git a/container-scan/README.md b/container-scan/README.md index 2a75859..691bdb9 100644 --- a/container-scan/README.md +++ b/container-scan/README.md @@ -13,6 +13,12 @@ GitHub Action for scanning container images for vulnerabilities using Lacework. ```yaml - uses: @ with: + skip-checkout: + # Skip repository checkout in this step + # + # Required: false + # Default: false + dockerhub-user: # DockerHub username # diff --git a/container-scan/action.yaml b/container-scan/action.yaml index 268ff2d..a88b351 100644 --- a/container-scan/action.yaml +++ b/container-scan/action.yaml @@ -3,6 +3,11 @@ description: > GitHub Action for scanning container images for vulnerabilities using Lacework. inputs: + skip-checkout: + required: false + default: "false" + description: Skip repository checkout in this step + dockerhub-user: required: false default: "" @@ -42,6 +47,7 @@ runs: using: composite steps: - name: Checkout Repository + if: ${{ inputs.skip-checkout != 'true' }} uses: actions/checkout@v4 - name: Build Docker Image