Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 month ago
JSON representation

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

Awesome Lists containing this project

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/[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](https://github.com/marvinscham/disenchanter/blob/main/.github/workflows/league-patch.yml)/[Repository/README](https://github.com/marvinscham/disenchanter)_