From 115c4a7f05cd65618632adfbfade580992f8169e Mon Sep 17 00:00:00 2001 From: Sandhya K <119936880+sand-hya@users.noreply.github.com> Date: Fri, 9 Feb 2024 16:36:15 +0530 Subject: [PATCH] Create criticality_score.yml --- .github/workflows/criticality_score.yml | 39 +++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/criticality_score.yml diff --git a/.github/workflows/criticality_score.yml b/.github/workflows/criticality_score.yml new file mode 100644 index 000000000..5b8ec74bc --- /dev/null +++ b/.github/workflows/criticality_score.yml @@ -0,0 +1,39 @@ +name: "criticality score" +on: + push: + branches: + - main + + workflow_dispatch: + inputs: + github_auth_token: + description: 'github auth token' + required: true + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Installing go + uses: actions/setup-go@v4 + with: + go-version: '1.21' + + - name: Installing criticality score + run: | + go install github.com/ossf/criticality_score/cmd/criticality_score@latest + + - name: Generate criticality score + run: | + export GITHUB_TOKEN=$INPUT_TOKEN + criticality_score -depsdev-disable -format json https://github.com/${{ github.repository }} + env: + INPUT_TOKEN: ${{ github.event.inputs.github_auth_token }}