Skip to content

BBB Recording Player Updates #64

BBB Recording Player Updates

BBB Recording Player Updates #64

name: BBB Recording Player Updates
on:
schedule:
- cron: "0 0 * * *" # Run every day at midnight
jobs:
check-for-updates:
name: Check for BBB Recording Player Updates
runs-on: ubuntu-latest
steps:
- name: Get the latest BBB Recording Player release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -s --request GET \
--url "https://api.github.com/repos/bigbluebutton/bbb-playback/releases/latest" \
--header "Authorization: Bearer $GH_TOKEN" \
> player-release.json
- name: Extract the latest BBB Recording Player version
run: echo "LATEST_PLAYER_VERSION=$(jq -r '.tag_name' player-release.json | sed 's/^v//')" >> $GITHUB_ENV
- name: Extract release notes
run: |
RELEASE_NOTES=$(jq -r '.body' player-release.json)
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
echo "$RELEASE_NOTES" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Extract the current BBB Recording Player version from Docker file
run: echo "CURRENT_PLAYER_VERSION=$(sed -n 's/ARG PLAYBACK_PLAYER_VERSION=//p' docker/app/Dockerfile)" >> $GITHUB_ENV
- name: Compare the versions
run: echo "NEEDS_UPDATE=$(dpkg --compare-versions ${{ env.LATEST_PLAYER_VERSION }} gt ${{ env.CURRENT_PLAYER_VERSION }} && echo true || echo false)" >> $GITHUB_ENV
- name: Update the BBB Player version
if: ${{ env.NEEDS_UPDATE == 'true' }}
run: |
sed -i "s/ARG PLAYBACK_PLAYER_VERSION=.*/ARG PLAYBACK_PLAYER_VERSION=${LATEST_PLAYER_VERSION}/" docker/app/Dockerfile
- name: Create PR with the update
if: ${{ env.NEEDS_UPDATE == 'true' }}
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
add-paths: "docker/app/Dockerfile"
commit-message: "Update BBB Recording Player to version ${{ env.LATEST_PLAYER_VERSION }}"
title: "Bump BBB Recording Player from ${{ env.CURRENT_PLAYER_VERSION }} to ${{ env.LATEST_PLAYER_VERSION }}"
labels: "dependencies"
body: |
Bumps BBB Recording Player from ${{ env.CURRENT_PLAYER_VERSION }} to ${{ env.LATEST_PLAYER_VERSION }}
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/bigbluebutton/bbb-playback/releases">bigbluebutton/bbb-playback's releases</a>.</em></p>
${{ env.RELEASE_NOTES }}
</details>
## Automated Update
This PR was automatically generated by the BBB Recording Player update workflow.
branch: "update-bbb-recording-player-${{ env.LATEST_PLAYER_VERSION }}"