Generate Media #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Generate Media | |
on: | |
workflow_dispatch: | |
inputs: | |
mainline_product: | |
description: 'Mainline product branch' | |
required: true | |
default: 'wow' | |
type: choice | |
options: | |
- wow | |
- wowt | |
- wowxptr | |
- wow_beta | |
classic_product: | |
description: 'Classic product branch' | |
required: true | |
default: 'wow_classic' | |
type: choice | |
options: | |
- wow_classic | |
- wow_classic_ptr | |
- wow_classic_beta | |
classic_era_product: | |
description: 'Classic Era product branch' | |
required: true | |
default: 'wow_classic_era' | |
type: choice | |
options: | |
- wow_classic_era | |
- wow_classic_era_ptr | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -qqy ffmpeg | |
sudo python3 -m pip install git+https://github.com/luarocks/hererocks | |
sudo hererocks -l 5.1 -r latest /usr/local | |
sudo luarocks make | |
- name: Cache database | |
uses: actions/cache@v3 | |
with: | |
key: database | |
path: | | |
.cache/build.* | |
.cache/cdn.* | |
.cache/encoding.* | |
.cache/index.* | |
.cache/pconf.* | |
.cache/root.* | |
- name: Generate Media | |
run: make ${MAINLINE_PRODUCT} ${CLASSIC_PRODUCT} ${CLASSIC_ERA_PRODUCT} | |
env: | |
MAINLINE_PRODUCT: ${{ inputs.mainline_product }} | |
CLASSIC_PRODUCT: ${{ inputs.classic_product }} | |
CLASSIC_ERA_PRODUCT: ${{ inputs.classic_era_product }} | |
- name: Increment library version | |
run: | | |
if [[ -n "$(git status --porcelain=v1 2>/dev/null)" ]]; then | |
perl -i -pe 's/(MINOR_VERSION = )(\d+)/$1.($2+1)/e' LibRPMedia-1.2.lua | |
fi | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
branch: actions/regenerate-databases | |
commit-message: Regenerate Databases | |
delete-branch: true | |
title: Automated regeneration of media databases | |
body: Automated regeneration of media databases. | |
author: GitHub <[email protected]> | |
reviewers: Meorawr |