diff --git a/.github/workflows/detect-duplicate-actions.yml b/.github/workflows/detect-duplicate-actions.yml new file mode 100644 index 000000000..aad87f095 --- /dev/null +++ b/.github/workflows/detect-duplicate-actions.yml @@ -0,0 +1,24 @@ +name: detect-duplicate-actions + +on: + workflow_call: + outputs: + should_skip: + description: 'Returns "true" if the current run should be skipped' + value: ${{ jobs.detect-duplicate-actions.outputs.should_skip }} + +jobs: + detect-duplicate-actions: + name: detect-duplicate-actions + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - name: Detect Duplicate + id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]' + do_not_skip: '["workflow_dispatch", "schedule"]' + cancel_others: 'true' + concurrent_skipping: 'same_content' diff --git a/.github/workflows/gitleaks.yml b/.github/workflows/gitleaks.yml new file mode 100644 index 000000000..f8f453b9d --- /dev/null +++ b/.github/workflows/gitleaks.yml @@ -0,0 +1,23 @@ +name: Code Scan +on: + push: + branches: [dev] + pull_request: + workflow_dispatch: + +jobs: + detect-duplicate-actions: + uses: ./.github/workflows/detect-duplicate-actions.yml + gitleaks: + name: gitleaks + needs: detect-duplicate-actions + if: ${{ needs.detect-duplicate-actions.outputs.should_skip != 'true' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: gitleaks/gitleaks-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITLEAKS_NOTIFY_USER_LIST: '@elijaholmos' diff --git a/.github/workflows/license-check.yml b/.github/workflows/license-check.yml index f1b695222..97c3236dc 100644 --- a/.github/workflows/license-check.yml +++ b/.github/workflows/license-check.yml @@ -9,19 +9,7 @@ on: jobs: detect-duplicate-actions: - name: detect-duplicate-actions - runs-on: ubuntu-latest - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - name: Detect Duplicate - id: skip_check - uses: fkirc/skip-duplicate-actions@master - with: - paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]' - do_not_skip: '["workflow_dispatch", "schedule"]' - cancel_others: 'true' - concurrent_skipping: 'same_content' + uses: ./.github/workflows/detect-duplicate-actions.yml check-license-headers: name: check-license-headers needs: detect-duplicate-actions