-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (30 loc) · 1.1 KB
/
legitify-repo-scan-pat.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Legitify Scan (PAT)
on: [workflow_dispatch]
permissions:
issues: write
jobs:
scan-repository:
name: Scan Repository
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Scan Repo
uses: Legit-Labs/legitify@b814483c588aefad01b33e921008e73352639277
with:
github_token: ${{ secrets.GH_PAT }}
analyze_self_only: "true"
- name: Create Summary Issue
if: success()
env:
GH_TOKEN: ${{ github.token }}
run: |
date=`date +%m-%d-%Y`
gh issue create --title "Daily Scan Report - ${date}" --body "The summary is available at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
- name: Create Error Issue
if: failure()
env:
GH_TOKEN: ${{ github.token }}
run: |
date=`date +%m-%d-%Y`
gh issue create --title "Repository Scan Failed - ${date}" --body "The repository scan failed, see ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"