Skip to content

Templates Dependencies New Version Released #258

Templates Dependencies New Version Released

Templates Dependencies New Version Released #258

name: Templates 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/get-dailydigest-dependencies.js)" >> $GITHUB_OUTPUT
- name: Get All Updated SDK Dependencies
id: getUpdatedSDKDependencies
run: |
echo "result=$(node ./.github/scripts/get-sdk-dependencies.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="Templates 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 }}
- name: Setup Email and Recipient
if: ${{ always() }}
id: sdk-email
run: |
emails="[email protected]"
subject="SDK Dependencies Daily Check ${{ steps.getDate.outputs.date }}"
body=${{steps.getUpdatedSDKDependencies.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.sdk-email.outputs.to }}
BODY: ${{ steps.sdk-email.outputs.body }}
SUBJECT: ${{ steps.sdk-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 }}