Skip to content

Commit

Permalink
Merge branch 'master' into youtube-to-anchor-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg authored Oct 31, 2023
2 parents 5e46b9f + af0be2a commit 12e9f88
Show file tree
Hide file tree
Showing 17 changed files with 85 additions and 187 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/create-event-ad-hoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
create_zoom: true
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
ZOOM_API_KEY: ${{ secrets.ZOOM_API_KEY }}
ZOOM_API_SECRET: ${{ secrets.ZOOM_API_SECRET }}
ZOOM_ACCOUNT_ID: ${{ secrets.ZOOM_ACCOUNT_ID }}
ZOOM_TOKEN: ${{ secrets.ZOOM_TOKEN }}
STREAM_URL: ${{ secrets.STREAM_URL }}
STREAM_KEY: ${{ secrets.STREAM_KEY }}
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-event-community-meeting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
create_zoom: true
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
ZOOM_API_KEY: ${{ secrets.ZOOM_API_KEY }}
ZOOM_API_SECRET: ${{ secrets.ZOOM_API_SECRET }}
ZOOM_ACCOUNT_ID: ${{ secrets.ZOOM_ACCOUNT_ID }}
ZOOM_TOKEN: ${{ secrets.ZOOM_TOKEN }}
STREAM_URL: ${{ secrets.STREAM_URL }}
STREAM_KEY: ${{ secrets.STREAM_KEY }}
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
Expand Down
160 changes: 0 additions & 160 deletions .github/workflows/create-event-helpers/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .github/workflows/create-event-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"@actions/core": "^1.6.0",
"@mailchimp/mailchimp_marketing": "^3.0.74",
"googleapis": "^99.0.0",
"jsonwebtoken": "^8.5.1",
"node-fetch": "2.6.1"
}
}
32 changes: 22 additions & 10 deletions .github/workflows/create-event-helpers/zoom/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const fetch = require('node-fetch');
const jwt = require('jsonwebtoken');
const { URLSearchParams } = require('url');
const core = require('@actions/core');

/**
Expand All @@ -11,15 +11,25 @@ const core = require('@actions/core');
module.exports = async(date, time, host, cohost) => {

const meetingTitle = process.env.MEETING_NAME;
let meetingDetails;
let meetingDetails, token;

const tokenConfig = {
iss: process.env.ZOOM_API_KEY,
exp: ((new Date()).getTime() + 5000)
//getting request token
try {
const params = new URLSearchParams();
params.append('grant_type', 'account_credentials');
params.append('account_id', process.env.ZOOM_ACCOUNT_ID);
const tokenCreationResponse = await fetch('https://zoom.us/oauth/token', {
method: 'POST',
body: params,
headers: {
Authorization: `Basic ${ process.env.ZOOM_TOKEN }`
},
});
token = (await tokenCreationResponse.json()).access_token;
} catch (error) {
return core.setFailed(`Failed getting token: ${ error }`)
}

const token = jwt.sign(tokenConfig, process.env.ZOOM_API_SECRET);

const zoomSettings = JSON.stringify({
topic: meetingTitle,
type: '2',
Expand Down Expand Up @@ -57,8 +67,11 @@ module.exports = async(date, time, host, cohost) => {
return core.setFailed(`Meeting creation failed: ${ error }`)
}

//core.debug(JSON.stringify(meetingDetails));
const meetingId = meetingDetails.id;
if (!meetingId) {
core.info(JSON.stringify(meetingDetails, null, 4));
return core.setFailed('meetingId is not available which means something went wrong in communication with Zoom');
}
const meetingUrl = meetingDetails.join_url;

const streamOptions = JSON.stringify({
Expand All @@ -84,7 +97,6 @@ module.exports = async(date, time, host, cohost) => {
return core.setFailed(`Meeting update with streaming info failed: ${ error }`)
}

if (!meetingId) return core.setFailed('meetingId is not available which means something went wrong in communication with Zoom. Most probably the host that you defined is not yet part of related Zoom account');
core.info(`Created meeting ${ meetingId } that you can join at ${ meetingUrl }`);
core.setOutput('meetingUrl', meetingUrl);
}
}
4 changes: 2 additions & 2 deletions .github/workflows/create-event-lets-talk-about.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
create_zoom: false
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
ZOOM_API_KEY: ${{ secrets.ZOOM_API_KEY }}
ZOOM_API_SECRET: ${{ secrets.ZOOM_API_SECRET }}
ZOOM_ACCOUNT_ID: ${{ secrets.ZOOM_ACCOUNT_ID }}
ZOOM_TOKEN: ${{ secrets.ZOOM_TOKEN }}
STREAM_URL: ${{ secrets.STREAM_URL }}
STREAM_KEY: ${{ secrets.STREAM_KEY }}
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-event-spec-3-0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
create_zoom: true
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
ZOOM_API_KEY: ${{ secrets.ZOOM_API_KEY }}
ZOOM_API_SECRET: ${{ secrets.ZOOM_API_SECRET }}
ZOOM_ACCOUNT_ID: ${{ secrets.ZOOM_ACCOUNT_ID }}
ZOOM_TOKEN: ${{ secrets.ZOOM_TOKEN }}
STREAM_URL: ${{ secrets.STREAM_URL }}
STREAM_KEY: ${{ secrets.STREAM_KEY }}
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-event-spec-3-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
create_zoom: true
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
ZOOM_API_KEY: ${{ secrets.ZOOM_API_KEY }}
ZOOM_API_SECRET: ${{ secrets.ZOOM_API_SECRET }}
ZOOM_ACCOUNT_ID: ${{ secrets.ZOOM_ACCOUNT_ID }}
ZOOM_TOKEN: ${{ secrets.ZOOM_TOKEN }}
STREAM_URL: ${{ secrets.STREAM_URL }}
STREAM_KEY: ${{ secrets.STREAM_KEY }}
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-event-thinking-out-loud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
create_zoom: true
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
ZOOM_API_KEY: ${{ secrets.ZOOM_API_KEY }}
ZOOM_API_SECRET: ${{ secrets.ZOOM_API_SECRET }}
ZOOM_ACCOUNT_ID: ${{ secrets.ZOOM_ACCOUNT_ID }}
ZOOM_TOKEN: ${{ secrets.ZOOM_TOKEN }}
STREAM_URL: ${{ secrets.STREAM_URL }}
STREAM_KEY: ${{ secrets.STREAM_KEY }}
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/create-event-workflow-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ on:
secrets:
GH_TOKEN:
required: true
ZOOM_API_KEY:
ZOOM_ACCOUNT_ID:
required: true
ZOOM_API_SECRET:
ZOOM_TOKEN:
required: true
STREAM_URL:
required: true
Expand All @@ -74,8 +74,8 @@ on:
jobs:
setup-meeting:
env:
ZOOM_API_KEY: ${{ secrets.ZOOM_API_KEY }}
ZOOM_API_SECRET: ${{ secrets.ZOOM_API_SECRET }}
ZOOM_ACCOUNT_ID: ${{ secrets.ZOOM_ACCOUNT_ID }}
ZOOM_TOKEN: ${{ secrets.ZOOM_TOKEN }}
STREAM_URL: ${{ secrets.STREAM_URL }}
STREAM_KEY: ${{ secrets.STREAM_KEY }}
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
Expand Down
5 changes: 5 additions & 0 deletions tweets/recurring-discuss-ideas/2023-10-01.tweet
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Do you have some nice ideas for #AsyncAPI-related tools? Do you want to validate and share with the AsyncAPI community?

Drop it 👇 and let us have an open discussion 🚀

https://github.com/asyncapi/community/discussions/categories/ideas
7 changes: 7 additions & 0 deletions tweets/recurring-slack-link/2023-09-23.tweet
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
✨ Did you know #AsyncAPI is on Slack? ✨

Join our Slack workspace to chat with anyone from our Open-Source community!

🔗 asyncapi.com/slack-invite

Ask for help and help others too. 💪🏿💪🏽🦾
7 changes: 7 additions & 0 deletions tweets/recurring-slack-link/2023-09-30.tweet
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
✨ Did you know #AsyncAPI is on Slack? ✨

Join our Slack workspace to chat with anyone from our Open-Source community!

🔗 asyncapi.com/slack-invite

Ask for help and help others too. 💪🏿💪🏽🦾
7 changes: 7 additions & 0 deletions tweets/recurring-slack-link/2023-10-07.tweet
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
✨ Did you know #AsyncAPI is on Slack? ✨

Join our Slack workspace to chat with anyone from our Open-Source community!

🔗 asyncapi.com/slack-invite

Ask for help and help others too. 💪🏿💪🏽🦾
7 changes: 7 additions & 0 deletions tweets/recurring-slack-link/2023-10-14.tweet
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
✨ Did you know #AsyncAPI is on Slack? ✨

Join our Slack workspace to chat with anyone from our Open-Source community!

🔗 asyncapi.com/slack-invite

Ask for help and help others too. 💪🏿💪🏽🦾
Loading

0 comments on commit 12e9f88

Please sign in to comment.