Skip to content
download-cloud

GitHub Action

get-league-patch

v1.1.1 Latest version

get-league-patch

download-cloud

get-league-patch

An Action to grab the latest League of Legends patch from Data Dragon

Installation

Copy and paste the following snippet into your .yml file.

              

- name: get-league-patch

uses: marvinscham/[email protected]

Learn more about this action in marvinscham/get-league-patch

Choose a version

Get League Patch [Action]

An Action to grab the latest League of Legends patch from Data Dragon

Usage

A patch string like 12.1 will be saved to an output variable named patch.

The action will fail if the patch info cannot be retrieved or seems invalid.

Example

This will check for a new League Patch every day and create a PR to keep the badge in the README file up to date.

Note how the output variable is accessed via ${{ steps.yourStepId.outputs.patch }}

name: Update League Patch in README

on:
  schedule: [{ cron: '0 0 * * *' }]

jobs:
  update-badge:
    name: Update League Patch in README
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@v3
        name: Check out current commit

      - id: yourStepId
        name: Get patch info
        uses: marvinscham/[email protected]

        # Replaces patch info with regex
      - name: Update patch in README shield
        run: sed -i "s/league%20patch-.*-brightgreen/league%20patch-${{ steps.yourStepId.outputs.patch }}-brightgreen/g" README.md
        shell: bash

      - name: Create Pull Request
        uses: peter-evans/[email protected]
        with:
          commit-message: Bump League Patch to ${{ steps.patch.outputs.patch }}
          title: Bump League Patch to ${{ steps.patch.outputs.patch }}
          body: This is an automated PR.
          branch: update-league-patch

Derived from: Action YAML/Repository/README