From 7724235e602936230549653d5a142e6566f92f63 Mon Sep 17 00:00:00 2001 From: Klaus Hartl Date: Sun, 19 Sep 2021 08:22:18 +0200 Subject: [PATCH] Fix args setup --- .github/workflows/main.yml | 2 -- action.yml | 11 ++++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad3d7fe..34f7ba7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,5 +11,3 @@ jobs: - uses: actions/checkout@v2 - name: Test talisman uses: ./ - with: - args: refs/heads/main ${{ github.event.after }} refs/heads/main ${{ github.event.before }} diff --git a/action.yml b/action.yml index 33e45bc..b461799 100644 --- a/action.yml +++ b/action.yml @@ -1,7 +1,16 @@ name: "Detect secrets with Talisman" description: "Scan an incoming range of commits for accidentally added secrets and sensitive information" +inputs: + local-sha: + description: "The latest of the incoming commits" + required: false + default: ${{ github.event.after }} + remote-sha: + description: "The latest commit on the remote being pushed to" + required: false + default: ${{ github.event.before }} runs: using: "docker" image: "Dockerfile" args: - - refs/heads/main ${{ github.event.after }} refs/heads/main ${{ github.event.before }} + - refs/heads/main ${{ inputs.local-sha }} refs/heads/main ${{ inputs.remote-sha }}