Skip to content

Transmission Version Check #10491

Transmission Version Check

Transmission Version Check #10491

name: Transmission Version Check
on:
schedule:
- cron: 0 * * * *
workflow_dispatch: {}
jobs:
get-transmission-version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
ref: dev
- name: Check for new version of Transmission
run: |
LATEST_SHA=$(curl -L https://api.github.com/repos/transmission/transmission/tags | tac | tac | awk '/sha/ {print $2; exit}' | sed -e 's/[",]//g')
LATEST_VERSION=$(curl -L https://api.github.com/repos/transmission/transmission/releases/latest | awk '/tag_name/ {print $2}' | sed -e 's/[",]//g')
CURRENT_SHA=$(cat upstream/transmission-sha.txt)
if [ "$LATEST_SHA" != "$CURRENT_SHA" -a -n "$LATEST_SHA" -a -n "$LATEST_VERSION" ]; then
echo "$LATEST_SHA" > upstream/transmission-sha.txt
echo "$LATEST_VERSION" > upstream/transmission-version.txt
git config --global user.email "[email protected]"
git config --global user.name "workflow runner"
git add upstream/transmission-sha.txt
git add upstream/transmission-version.txt
git config user.email "[email protected]"
git config user.name "Transmission-Bot"
git commit -m "update transmission build version to ${LATEST_VERSION}"
git push origin dev
fi