Skip to content

Commit 0ea464b

Browse files
committed
feat: use JSON, templates, npx, and add dry-run support
1 parent 96688fb commit 0ea464b

File tree

142 files changed

+894
-2602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+894
-2602
lines changed

.github/workflows/create-meeting-artifacts-manual.yml

Lines changed: 0 additions & 82 deletions
This file was deleted.

.github/workflows/create-meeting-artifacts-scheduled.yml

Lines changed: 0 additions & 82 deletions
This file was deleted.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Create Meeting Artifacts
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
meeting_group:
7+
description: 'Meeting group to create artifacts for'
8+
required: true
9+
type: string
10+
dry_run:
11+
type: boolean
12+
description: 'Dry run?'
13+
default: false
14+
required: true
15+
workflow_call:
16+
inputs:
17+
meeting_group:
18+
description: 'Meeting group to create artifacts for'
19+
required: true
20+
type: string
21+
dry_run:
22+
type: boolean
23+
description: 'Dry run?'
24+
default: false
25+
required: true
26+
27+
env:
28+
GROUP: ${{ github.event.inputs.meeting_group }}
29+
30+
jobs:
31+
create-artifacts:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
36+
37+
- name: Setup Node.js
38+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
39+
with:
40+
node-version-file: '.nvmrc'
41+
cache: 'npm'
42+
43+
- name: Install dependencies
44+
run: npm ci
45+
46+
- name: Read Meeting Variables
47+
id: read-vars
48+
run: echo "user=$(jq -r '.github.owner' "configs/$GROUP.json")" >> $GITHUB_OUTPUT
49+
50+
- name: Create GitHub App Token
51+
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
52+
id: app-token
53+
with:
54+
app-id: ${{ secrets.BOT_ID }}
55+
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
56+
owner: ${{ steps.read-vars.outputs.user }}
57+
58+
- name: Create meeting artifacts
59+
env:
60+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
61+
HACKMD_API_TOKEN: ${{ secrets.HACKMD_API_TOKEN }}
62+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
63+
run: npx . $GROUP ${{ github.event.inputs.dry_run && '--dry-run' }}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Create Meeting Artifacts (Scheduled)
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
dry_run:
7+
type: boolean
8+
description: 'Dry run?'
9+
default: false
10+
required: true
11+
schedule:
12+
- cron: '0 10 * * 1'
13+
14+
jobs:
15+
create-matrix:
16+
runs-on: ubuntu-latest
17+
outputs:
18+
groups: ${{ steps.set-matrix.outputs.configs }}
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
22+
23+
- name: Get config basenames
24+
id: set-matrix
25+
run: |
26+
CONFIGS=$(find configs/ -maxdepth 1 -type f -name '*.json' -exec basename {} .json \; | jq -R -s -c 'split("\n")[:-1]')
27+
echo "configs=$CONFIGS" >> $GITHUB_OUTPUT
28+
29+
create-artifacts:
30+
needs: create-matrix
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
groups: ${{ fromJson(needs.create-matrix.outputs.groups) }}
35+
uses: ./.github/create-meeting-artifacts.yml
36+
with:
37+
meeting_group: ${{ matrix.groups }}
38+
dry_run: ${{ github.event.inputs.dry_run }}

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
templates/
1+
template.hbs

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
Michael Dawson <mdawson@devrus.com>
22
Claudio Wunder <cwunder@gnome.org>
3+
Aviv Keller <me@aviv.sh>

0 commit comments

Comments
 (0)