Skip to content

Get latest patches release version #1322

Get latest patches release version

Get latest patches release version #1322

Workflow file for this run

name: Get latest patches release version
on:
schedule:
- cron: '25 */12 * * *'
workflow_dispatch:
jobs:
get-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.REPO_SCOPED_TOKEN }}
- name: Fetch release version
run: |
curl -sL https://api.github.com/repos/revanced/revanced-patches/releases/latest | \
jq -r ".tag_name" > release-versions/patches-latest.md
- name: Check for modified files
id: git-check
run: echo "modified=$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")" >> $GITHUB_OUTPUT
- name: Commit latest release version
if: steps.git-check.outputs.modified == 'true'
run: |
git config --global user.name 'Revanced-Creator'
git config --global user.email 'Revanced-Creator@users.noreply.github.com'
git commit -am "New patches released, starting CI"
git push
del_runs:
runs-on: ubuntu-latest
steps:
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@v2.0.3
with:
token: ${{ secrets.REPO_SCOPED_TOKEN }}
repository: ${{ github.repository }}
retain_days: 10
keep_minimum_runs: 4