Podcast data #850
This file contains hidden or 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: Podcast data | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "5 11 * * 1,3,5" # Run at 04:05 on Monday, Wednesday, and Friday. | |
| jobs: | |
| data_workflow: | |
| name: Data workflow | |
| runs-on: ubuntu-24.04 | |
| defaults: | |
| run: | |
| working-directory: app | |
| steps: | |
| - uses: actions/checkout@v6.0.1 | |
| - uses: actions/setup-go@v6.0.0 | |
| with: | |
| go-version: "1.25" | |
| cache-dependency-path: app/go.sum | |
| # Caching go modules to speed up the run | |
| - uses: actions/cache@v4.3.0 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Build | |
| run: make build | |
| - name: GermanTechPodcasts Convert YAML to JSON | |
| run: ./GermanTechPodcasts convertYamlToJson --yaml-directory ../podcasts --json-directory ../generated | |
| - name: GermanTechPodcasts Gather additional podcast data | |
| run: ./GermanTechPodcasts collectPodcastData --api-key ${{ secrets.PODCASTINDEX_API_KEY }} --api-secret ${{ secrets.PODCASTINDEX_API_SECRET }} --json-directory ../generated | |
| - name: GermanTechPodcasts Convert JSON to README | |
| run: ./GermanTechPodcasts convertJsonToReadme --json-directory ../generated --readme-template ../assets/README.template --readme-output ../README.md | |
| - name: GermanTechPodcasts Render OPML file | |
| run: ./GermanTechPodcasts generateOpml --json-directory ../generated --opml-output ../podcasts.opml | |
| # Commit results back to repository | |
| - uses: stefanzweifel/git-auto-commit-action@v7.0.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| commit_message: Update generated podcast content | |
| branch: main | |
| commit_user_name: Podcast data update bot | |
| commit_user_email: stehtisch@engineeringkiosk.dev | |
| commit_author: Podcast data update bot <stehtisch@engineeringkiosk.dev> | |
| - name: Trigger webpage to sync | |
| uses: peter-evans/repository-dispatch@v4.0.1 | |
| with: | |
| token: ${{ secrets.REPOSITORY_DISPATCH_TOKEN }} | |
| repository: EngineeringKiosk/webpage | |
| event-type: podcast-list-update |