https://github.com/marvinscham/get-league-patch
An Action to grab the latest League of Legends patch from Data Dragon
https://github.com/marvinscham/get-league-patch
action data-dragon github-actions league-of-legends
Last synced: about 1 year ago
JSON representation
An Action to grab the latest League of Legends patch from Data Dragon
- Host: GitHub
- URL: https://github.com/marvinscham/get-league-patch
- Owner: marvinscham
- License: mit
- Created: 2022-07-31T08:55:47.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-29T20:21:37.000Z (over 2 years ago)
- Last Synced: 2025-03-20T10:48:07.362Z (about 1 year ago)
- Topics: action, data-dragon, github-actions, league-of-legends
- Homepage:
- Size: 19.5 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-league - Get League Patch - A GitHub Action saving the latest patch into a variable. (DevOps Tools)
README
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 }}`
```yaml
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/get-league-patch@v1.0.0
# 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/create-pull-request@v4.0.4
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](https://github.com/marvinscham/disenchanter/blob/main/.github/workflows/league-patch.yml)/[Repository/README](https://github.com/marvinscham/disenchanter)_