Skip to content

Commit

Permalink
Move checkout outside of custom action
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomdango committed Jun 29, 2023
1 parent fc3659b commit d9244fe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
2 changes: 0 additions & 2 deletions .github/actions/check-format/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 0 additions & 4 deletions .github/actions/scan-secrets/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/cicd-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit d9244fe

Please sign in to comment.