convert all PCSX2 Cheats found on archive #383
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: Update Cheats list | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'CHT/*.cht' | |
- '.github/workflows/list_cheats.yml' | |
jobs: | |
List-cheats: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get short SHA | |
id: slug | |
run: echo "CHTCNT=$(find CHT -name "*.cht" | wc -l)" >> $GITHUB_ENV | |
- name: Update Cheats list | |
run: | | |
cd CHT | |
echo game count\|${{ env.CHTCNT }}> ../cheat_list.MD | |
echo ------------- \| --------------- \|>> ../cheat_list.MD | |
head -n1 -q *.cht | tr -d \" > ../temp.MD | |
cd .. | |
sed -i 's/\/ID/ \| /' temp.MD | |
sed -E -i 's/[a-zA-Z]{4}_[0-9]{3}\.[0-9]{2}/[\0](.\/CHT\/\0.cht)/' temp.MD | |
sort temp.MD >>cheat_list.MD | |
rm temp.MD | |
- name: print generated list | |
if: github.ref != 'refs/heads/main' | |
run: | | |
cat cheat_list.MD | |
- uses: EndBug/add-and-commit@v9 | |
if: github.ref == 'refs/heads/main' | |
with: | |
default_author: github_actions | |
message: 'Update Widescreen cheat list' | |
# commit: '--amend' |