Create PR for meeting notes #51
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: Create PR for meeting notes | |
on: | |
workflow_dispatch: | |
inputs: | |
date: | |
description: Date of the meeting notes. MUST be understood by `date --date`. | |
required: false | |
default: "now" | |
type: string | |
pull_request: | |
types: | |
- labeled | |
permissions: | |
contents: write | |
pull-requests: write | |
# You need to enable 'Allow GitHub Actions to create and approve pull requests' | |
# in your Actions Settings too | |
jobs: | |
create: | |
if: github.event_name != 'pull_request' | |
uses: jaimergp/hackmd-meeting-notes-action/.github/workflows/create-meeting-notes-pr.yml@main | |
with: | |
date: ${{ inputs.date || 'now' }} | |
template_path: meeting-notes/TEMPLATE.md | |
output_path: meeting-notes/%Y-%m-%d.md | |
hackmd_team: jaimergp-team-demo | |
force_push: true | |
pr_body: | | |
New meeting notes available at ${env.hackmd_doc_url}. | |
Once done with the meeting, sync the note back to the repository by adding the `sync-hackmd-notes` label. | |
secrets: | |
HACKMD_TOKEN: ${{ secrets.HACKMD_TOKEN }} | |
sync: | |
if: github.event.label.name == 'sync-hackmd-notes' | |
uses: jaimergp/hackmd-meeting-notes-action/.github/workflows/sync-meeting-notes-pr.yml@main | |
with: | |
pr_number: ${{ github.event.number }} | |
secrets: | |
HACKMD_TOKEN: ${{ secrets.HACKMD_TOKEN }} |