Update TorrentMonitor version #13292
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: Update TorrentMonitor version | |
on: | |
schedule: | |
- cron: '0 */3 * * *' | |
jobs: | |
update_torrentmonitor: | |
name: Update TorrentMonitor verions | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update torrentmonitor version | |
id: downloadtorrentmonitor | |
shell: bash | |
run: | | |
wget -q https://tormon.ru/tm-latest.zip -qO /tmp/tm-latest.zip | |
unzip -q /tmp/tm-latest.zip -d /tmp/ | |
TM_VERSION=$(jq -r '.system' /tmp/TorrentMonitor-master/version.txt) | |
TM_DATE=$(head -n 1 /tmp/TorrentMonitor-master/changelog.txt | awk '{print $1;}') | |
sed -i "s/\(ENV VERSION=*\)[^ ]*/\1\"${TM_VERSION}\"/" Dockerfile | |
sed -i "s/\( RELEASE_DATE=*\)[^ ]*/\1\"${TM_DATE}\"/" Dockerfile | |
PR_BRANCH="tmupdatebot/torrentmonitorupdate-${TM_VERSION}" | |
echo "tm_version=${TM_VERSION}" >> $GITHUB_ENV | |
echo "tm_date=${TM_DATE}" >> $GITHUB_ENV | |
echo "pr_branch=${PR_BRANCH}" >> $GITHUB_ENV | |
echo "Base pr_branch=${PR_BRANCH}, date=${TM_DATE}, tm_version=${TM_VERSION}" | |
- name: Create Pull Request, Bump tm-latest.zip, torrentmonitor version ${{ env.tm_version }} | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
branch: ${{ env.pr_branch }} | |
commit-message: TM -> ${{ env.tm_version }} | |
delete-branch: true | |
title: Bump TM to version ${{ env.tm_version }} | |
body: | | |
Bump tm-latest.zip, version ${{ env.tm_version }}, date ${{ env.tm_date }} | |
- Auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request) | |
labels: | | |
dependencies | |
github_actions | |
release |