From 43152ec6b705f4811175933cada488f30f961bbe Mon Sep 17 00:00:00 2001 From: Xueli Xie Date: Tue, 2 Mar 2021 15:49:24 -0800 Subject: [PATCH 1/2] Added git-secrets check to Github Actions --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..718e286 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: CI Checks +on: + push: + branches: ["**"] + pull_request: + branches: [master] + workflow_dispatch: +jobs: + git-secrets: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Checkout awslabs/git-secrets + uses: actions/checkout@v2 + with: + repository: awslabs/git-secrets + ref: master + path: git-secrets + - name: Install git-secrets + run: cd git-secrets && sudo make install && cd .. + - name: Run git-secrets + run: | + git-secrets --register-aws + git-secrets --scan From 50dbe5f751ad8ec61f2337f7c635fadf6febea9a Mon Sep 17 00:00:00 2001 From: Xueli Xie Date: Thu, 4 Mar 2021 11:17:44 -0800 Subject: [PATCH 2/2] Changed to use correct branch name in PR case --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 718e286..776e715 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ on: push: branches: ["**"] pull_request: - branches: [master] + branches: ["main"] workflow_dispatch: jobs: git-secrets: