Samples Dependencies New Version Released #181
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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="teamsfxdigest@microsoft.com" | |
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 }} | |