-
Notifications
You must be signed in to change notification settings - Fork 251
55 lines (46 loc) · 1.66 KB
/
samples-dependencies-updated.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Samples Dependencies New Version Released
on:
workflow_dispatch:
schedule:
- cron: "0 15 * * *"
jobs:
notification:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install npm packages
run: |
npm install axios
npm install glob
- name: Get All Updated Templates Dependencies
id: getUpdatedTemplatesDependencies
run: |
echo "result=$(node ./.github/scripts/getSampleDependencies.js)" >> $GITHUB_OUTPUT
- name: Get Date
id: getDate
run: |
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Setup Email and Recipient
if: ${{ always() }}
id: template-email
run: |
emails="[email protected]"
subject="Samples Dependencies Daily Check ${{ steps.getDate.outputs.date }}"
body=${{steps.getUpdatedTemplatesDependencies.outputs.result}}
echo "to=$emails" >> $GITHUB_OUTPUT
echo "subject=$subject" >> $GITHUB_OUTPUT
echo "body=$body" >> $GITHUB_OUTPUT
- name: Send E-mail Notifications
uses: ./.github/actions/send-email-report
env:
TO: ${{ steps.template-email.outputs.to }}
BODY: ${{ steps.template-email.outputs.body }}
SUBJECT: ${{ steps.template-email.outputs.subject }}
MAIL_CLIENT_ID: ${{ secrets.TEST_CLEAN_CLIENT_ID }}
MAIL_CLIENT_SECRET: ${{ secrets.TEST_CLEAN_CLIENT_SECRET }}
MAIL_TENANT_ID: ${{ secrets.TEST_CLEAN_TENANT_ID }}