Create criticality_score.yml

This commit is contained in:
Sandhya K 2024-02-09 16:36:15 +05:30 committed by GitHub
parent 30a97de0c4
commit 115c4a7f05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

39
.github/workflows/criticality_score.yml vendored Normal file
View File

@ -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 }}