Skip to content

Commit

Permalink
send advisory fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DGovEnterprise authored Dec 15, 2023
1 parent 16f8826 commit d53cad6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/scripts/send-advisory.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def email_campaign (uid, title, overview, url, content):


#
sg = SendGridAPIClient(os.environ.get('SENDGRID_API'))
sg = SendGridAPIClient(os.environ.get('sendgrid_api'))

data = {
"name":f"{uid} - TLP CLEAR - {title}",
Expand Down Expand Up @@ -85,4 +85,6 @@ def email_campaign (uid, title, overview, url, content):
html_overview = markdown(overview)
html_filled = Template(Path("templates/tlp-clear-email-template.html").read_text()).substitute(title=title, overview=html_overview, url=url, uid=advisory_id)

email_campaign(advisory_uid, title, html_overview, url, html_filled)
email_campaign(advisory_uid, title, html_overview, url, html_filled)

print()
6 changes: 4 additions & 2 deletions .github/workflows/send-advisory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
advisory_url:
type: string


env: # sendgrid api token
sendgrid_api: ${{ secrets.SENDGRID_API }}

jobs:
send-modified-files:
name: Send advisory files added today, or send advisory from input url
Expand All @@ -24,5 +28,3 @@ jobs:
run: pip install -r requirements.txt
- name: Send advisories
run: ./.github/scripts/send-advisory.py "${{ inputs.advisory_url }}"
env: # sendgrid api token
super_secret: ${{ secrets.SENDGRID_API }}

0 comments on commit d53cad6

Please sign in to comment.