Skip to content

[pull] next from storybookjs:next #27

[pull] next from storybookjs:next

[pull] next from storybookjs:next #27

Workflow file for this run

name: agent-scan
on:
pull_request_target:
types:
- opened
- reopened
branches:
- next
- main
concurrency:
group: agent-scan-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
agentscan:
if: |
github.repository_owner == 'storybookjs' &&
github.event.pull_request.head.repo.full_name != github.repository &&
!contains(
fromJSON('["dependabot[bot]", "github-actions[bot]","storybook-bot"]'),
github.event.pull_request.user.login
)
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Install script dependencies
run: npm install --prefix .github/scripts
- name: Check author org membership
id: membership
env:
INPUT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INPUT_ORG: ${{ github.repository_owner }}
INPUT_USERNAME: ${{ github.event.pull_request.user.login }}
run: node .github/scripts/agent-scan-check-org-membership.mjs
- name: Cache AgentScan analysis
if: steps.membership.outputs.should-scan == 'true'
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7
with:
path: .agentscan-cache
key: agentscan-cache-${{ github.actor }}
restore-keys: agentscan-cache-
- name: AgentScan
if: steps.membership.outputs.should-scan == 'true'
id: agentscan
uses: MatteoGabriele/agentscan-action@a584774dd15cabe6df4c6ab45fc43514a3b56b2d
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
agent-scan-comment: false
cache-path: .agentscan-cache
- name: Label PR with classification
if: steps.membership.outputs.should-scan == 'true' && steps.agentscan.outputs.classification
env:
INPUT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INPUT_CLASSIFICATION: ${{ steps.agentscan.outputs.classification }}
run: node .github/scripts/agent-scan-label-pr.mjs