THEOplayer 6.11.0 #4
Workflow file for this run
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: Auto-open PRs for THEOplayer releases | |
on: | |
push: | |
branches: | |
- 'release/theoplayer-**' | |
jobs: | |
create-pr: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Check if pull request already exists | |
id: check_pr_exists | |
shell: bash | |
run: | | |
pr_count=$(gh pr list --base main --head $GITHUB_REF --state open --limit 1 --json number --jq length) | |
if ((pr_count > 0)); then | |
echo "exists=true" >> "$GITHUB_OUTPUT" | |
fi | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create pull request | |
if: ${{ !steps.check_pr_exists.outputs.exists }} | |
shell: bash | |
run: | | |
theoplayer_version=$(<theoplayer/version.txt) | |
gh pr create \ | |
--base main \ | |
--head $GITHUB_REF \ | |
--title "THEOplayer ${theoplayer_version}" \ | |
--body "This PR contains the new documentation and API references for THEOplayer version ${theoplayer_version}" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |