Skip to content

Commit

Permalink
allow multiple agendas to be generated
Browse files Browse the repository at this point in the history
  • Loading branch information
demarey committed May 14, 2024
1 parent 117687c commit 5733c93
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ on:
workflow_call:
inputs:
agenda_filename:
description: 'Filename of the agendas to be built, e.g. agenda.md'
description: 'Filenames of the agendas to be built, e.g. agenda1.md; agenda2.md'
required: true
type: string
abstract_link:
description: 'A link to the abstract page, e.g. https://foo.org/abstracts.html'
description: 'Links to the abstract page, e.g. https://foo.org/abstracts.html'
required: false
type: string

Expand All @@ -27,8 +27,14 @@ jobs:
- name: Build HTML
run: |
set -x
./pharo --headless Pharo.image eval "MicAgendaGenerator new abstractLink: '${{ inputs.abstract_link }}'; build: '${{ inputs.agenda_filename }}' trimBoth asFileReference"
echo "MD_OUTPUT_DIR=$( dirname '${{inputs.agenda_filename}}' )/generated" >> $GITHUB_ENV
# Split inputs on ; character
IFS=';' read -ra AGENDAS <<< "${{ inputs.agenda_filename }}"
IFS=';' read -ra LINKS <<< "${{ inputs.abstract_link }}"
for agenda_index in "${!AGENDAS[@]}"; do
LINK=${LINKS[$agenda_index]:-./abstracts.pdf}
./pharo --headless Pharo.image eval "MicAgendaGenerator new abstractLink: '$LINK'; build: '${AGENDAS[$agenda_index]}' trimBoth asFileReference"
done
echo "MD_OUTPUT_DIR=$( dirname '$AGENDAS[0]' )/generated" >> $GITHUB_ENV
# archive generated HTML so it can be used in another job (reusable workflows cannot have multiple steps)
- uses: actions/upload-artifact@v3
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ Pharo.image
Pharo*.sources

pharo-vm/

.DS_Store

0 comments on commit 5733c93

Please sign in to comment.