diff --git a/.github/actions/check-format/action.yml b/.github/actions/check-format/action.yml index 4fc8d91..d346cc8 100644 --- a/.github/actions/check-format/action.yml +++ b/.github/actions/check-format/action.yml @@ -2,8 +2,6 @@ name: "Check Formats" runs: using: "composite" steps: - - uses: actions/checkout@v3 - - name: Check File Format run: | export BRANCH_NAME=origin/${{ github.event.repository.default_branch }} diff --git a/.github/actions/scan-secrets/action.yml b/.github/actions/scan-secrets/action.yml index 9e621be..ee6ba5b 100644 --- a/.github/actions/scan-secrets/action.yml +++ b/.github/actions/scan-secrets/action.yml @@ -2,10 +2,6 @@ name: "Check Formats" runs: using: "composite" steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Scan Secrets run: | export ALL_FILES=true diff --git a/.github/workflows/cicd-pipeline.yaml b/.github/workflows/cicd-pipeline.yaml index bb936fb..7a84a34 100644 --- a/.github/workflows/cicd-pipeline.yaml +++ b/.github/workflows/cicd-pipeline.yaml @@ -26,24 +26,22 @@ jobs: echo "build_timestamp=$(date --date=$datetime -u +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT echo "build_epoch=$(date --date=$datetime -u +'%s')" >> $GITHUB_OUTPUT - scan-secrets: + precommit-checks: needs: [get-metadata] runs-on: ubuntu-latest - name: "Secrets Scan" - steps: - - uses: ./.github/actions/scan-secrets/ - - check-format: - needs: [get-metadata] - runs-on: ubuntu-latest - name: Check File & Markdown Format + name: Pre-Commit Checks steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: ./.github/actions/check-format/ + - uses: ./.github/actions/scan-secrets/ checkov: name: Checkov runs-on: ubuntu-latest - needs: [scan-secrets, check-format] + needs: [precommit-checks] steps: - uses: actions/checkout@v3 @@ -69,7 +67,7 @@ jobs: tflint: name: TFLint runs-on: ubuntu-latest - needs: [scan-secrets, check-format] + needs: [precommit-checks] steps: - uses: actions/checkout@v3