Skip to content

Get actions that use the OSS Scan action #9759

Get actions that use the OSS Scan action

Get actions that use the OSS Scan action #9759

Workflow file for this run

name: Get actions that use the OSS Scan action
on:
push:
branches:
- main
paths:
- .github/workflows/ossf-scan.yml
- .github/workflows/ossf-scan.ps1
schedule:
- cron: '50 3 * * *'
workflow_dispatch:
jobs:
get-data:
concurrency: there-can-be-only-one
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get App Token
id: get_workflow_token
uses: rajbos-actions/[email protected]
with:
application_id: 264650
application_private_key: ${{ secrets.Automation_App_Key }}
organization: actions-marketplace-validations
- shell: pwsh
name: Run reporting script
run: |
$actions=(cat status.json | ConvertFrom-Json)
Write-Host "Found [$($actions.Length)] actions in the datafile"
# $numberOfReposToDo = $actions.Length
$numberOfReposToDo = 1000
./.github/workflows/ossf-scan.ps1 -actions $actions -numberOfReposToDo $numberOfReposToDo -logSummary "$($env:GITHUB_STEP_SUMMARY)" -access_token "${{ secrets.ACCESS_TOKEN }}" -access_token_destination ${{ steps.get_workflow_token.outputs.token }}
- name: Commit changes
if: always()
run: |
# pull to make sure we have the latest contents and that the commit / push will succeed
# still fails if these two files have been updated ofc.
git pull --quiet
if [[ `git status --porcelain` ]]; then
git config --global user.email "[email protected]"
git config --global user.name "GITHUB_TOKEN"
git add status.json
git add failedForks.json
git commit -m "Update status.json"
git push
else
echo "Nothing to commit"
fi