Skip to content

The Beard says hooray we have another speaker @sonia-fscruz - This is… #97

The Beard says hooray we have another speaker @sonia-fscruz - This is…

The Beard says hooray we have another speaker @sonia-fscruz - This is… #97

Workflow file for this run

name: Create the speaker-list json file
on:
workflow_call:
secrets:
REPO_TOKEN:
required: true
workflow_dispatch:
push:
branches:
- main
paths:
- speakers/*
jobs:
websiteFile:
runs-on: ubuntu-latest
steps:
# this should pick up the changes pushed in previous job
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: main
token: ${{ secrets.REPO_TOKEN }}
- name: Create New speaker-list.json
run: |
$speakerFiles = Get-ChildItem ./speakers/*.json
$speakers = foreach($speakerFile in $speakerFiles){
Get-Content $speakerFile.FullName -Raw | ConvertFrom-Json
}
$speakers | ConvertTo-Json | Out-File ./website/speaker-list.json
shell: pwsh
# You also can print the whole github context to the logs to view more details.
- name: View the github context
run: Write-Host "$GITHUB_CONTEXT"
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
shell: pwsh
- name: Add & Commit
uses: EndBug/add-and-commit@v9
with:
pull: ' '
author_name: Beardy McBeardFace
author_email: mrrobsewell@outlook.com
message: 'The Beard says we updated the speaker-list.json. We have another speaker - This is an automated message'
github_token: ${{ secrets.REPO_TOKEN }}
- name: Add another comment to the issue
uses: peter-evans/create-or-update-comment@v2
if: github.event.issue.number != null
with:
issue-number: ${{ github.event.issue.number }}
body: |
The speaker-list.json file has been recreated ready for the website https://github.com/dataplat/DataSpeakers/blob/main/website/speaker-list.json
https://callfordataspeakers.com/precon should be updated now