From e1b5592a1b06bd500bf844e5a8fdd1d9d7f08c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maik=20M=C3=BCller?= <15815012+aatmmr@users.noreply.github.com> Date: Tue, 22 Aug 2023 22:25:40 +0200 Subject: [PATCH] ci(legitify-pat): adding issue creation on success and failure --- .github/workflows/legitify-repo-scan-pat.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/legitify-repo-scan-pat.yml b/.github/workflows/legitify-repo-scan-pat.yml index e3d9b1c..b51d4b3 100644 --- a/.github/workflows/legitify-repo-scan-pat.yml +++ b/.github/workflows/legitify-repo-scan-pat.yml @@ -20,5 +20,15 @@ jobs: github_token: ${{ secrets.GH_PAT }} analyze_self_only: "true" scorecard: yes - - + - name: Create Summary Issue + if: success() + 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() + 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 }}" + +