Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar event #885

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/calendar-event.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Create Calendar Event

on: [push]

jobs:
create-event:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
name: Create Event using Ms. Graph
steps:
- name: Print a message if client id exist
env:
clientId: ${{ secrets.CLIENT_ID }}
run: |
if [ -n "${{ secrets.CLIENT_ID }}" ] ; then
echo "Client ID exist and value is ${{ secrets.CLIENT_ID }}"
else
echo "Client ID is not found"
fi

- name: Message dump
run: echo '${{ toJSON(github.event) }}' | jq

- name: Checkout
uses: actions/checkout@v4

- name: Create event on the next day
uses: JulieGunawan/ms-graph-create-event-msal@main
env:
clientId: ${{ secrets.CLIENT_ID }}
clientSecret: ${{ secrets.CLIENT_SECRET }}
tenantId: ${{ secrets.TENANT_ID }}
with:
clientId: clientId
clientSecret: clientSecret
tenantId: tenantId
subject: 'Did you get the event?'
body: 'Some files have been pushed on ${{ github.repository }} from ${{ github.actor }}. Please find the details here ${{ github.event.compare }}.'
userEmail: 'yetty.gunawan@edu.sait.ca'
start: '2023-11-25T14:30:00'
end: '2023-11-25T15:00:00'
2 changes: 1 addition & 1 deletion .github/workflows/cats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- name: Action Cats
uses: ruairidhwm/action-cats@1.0.2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.SECRET_TOKEN }}
Loading