Skip to content

Update supported PMS versions #886

Update supported PMS versions

Update supported PMS versions #886

Workflow file for this run

---
"on":
workflow_dispatch:
schedule:
- cron: 0 0 * * *
name: Update supported PMS versions
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2.7.3
with:
shared-key: cache
- name: Build xtask
run: cargo build --package xtask
- id: tags
run: |
tags=$(cargo run -q --package xtask -- get-last-plex-tags --skip-tag latest --skip-tag beta --skip-tag plexpass)
echo "tags=$tags" >> $GITHUB_OUTPUT
first_tag=$(echo "$tags" | jq -r '.[0]')
echo "first_tag=$first_tag" >> $GITHUB_OUTPUT
second_tag=$(echo "$tags" | jq -r '.[1]')
echo "second_tag=$second_tag" >> $GITHUB_OUTPUT
last_tag=$(echo "$tags" | jq -r '.[2]')
echo "last_tag=$last_tag" >> $GITHUB_OUTPUT
- name: Update test.yml workflow
run: |
sed -i 's/plex_server_version: .*/plex_server_version: ${{ steps.tags.outputs.tags }}/g' .github/workflows/test.yml
- name: Update mergify.toml config
run: |
sed -i 's/\(Test on a real server ([^)]*)\).* # supported-version-1/\1 (${{ steps.tags.outputs.last_tag }}) # supported-version-1/g' .github/mergify.yml
sed -i 's/\(Test on a real server ([^)]*)\).* # supported-version-2/\1 (${{ steps.tags.outputs.second_tag }}) # supported-version-2/g' .github/mergify.yml
sed -i 's/\(Test on a real server ([^)]*)\).* # supported-version-3/\1 (${{ steps.tags.outputs.first_tag }}) # supported-version-3/g' .github/mergify.yml
- name: Update xtask/DOCKER_PLEX_IMAGE_TAG_MIN_SUPPORTED
run: |
sed -i 's/DOCKER_PLEX_IMAGE_TAG_MIN_SUPPORTED: &str = "[-a-z0-9.]*/DOCKER_PLEX_IMAGE_TAG_MIN_SUPPORTED: \&str = "${{ steps.tags.outputs.last_tag }}/g' crates/xtask/src/get_last_plex_tags.rs
- name: Update the list in README.md
run: |
plex_tags="$(echo '${{ steps.tags.outputs.tags }}' | jq -r '.[] | "* \(.)"')"
perl -0pi -e 's/(<!-- plex releases list start -->).*(<!-- plex releases list end -->)/$1\n!PMS_TAGS_LIST!\n$2/sm' README.md
perl -0pi -e "s/!PMS_TAGS_LIST!/$plex_tags/sm" README.md
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: "${{ secrets.PAT_GITHUB_PR }}"
commit-message: "ci: update PMS versions"
branch: "auto-pr/pms-update"
title: "Update the list of tested PMS releases"
labels: "C-Dependencies"
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"