The Beard says hooray we have another speaker @kiki76it - This is an … #104
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 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: [email protected] | |
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 | |