Cheat finder #76
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: Cheat finder | |
on: | |
workflow_dispatch: | |
inputs: | |
start: | |
type: string | |
required: true | |
end: | |
type: string | |
required: true | |
alphabet: | |
type: string | |
default: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
- uses: oven-sh/setup-bun@main | |
- name: Prepare data | |
run: | | |
bun gtasacchcf.js -s ${{ inputs.start }} -e ${{ inputs.end }} -a ${{ inputs.alphabet }} | |
bun tsv.js | |
- name: Git actions | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git branch ${{ inputs.start }}-${{ inputs.end }}-${{ inputs.alphabet }} | |
git checkout ${{ inputs.start }}-${{ inputs.end }}-${{ inputs.alphabet }} | |
git add data | |
git commit --message="[action] ${{ inputs.start }}-${{ inputs.end }}-${{ inputs.alphabet }}" | |
git push --set-upstream origin ${{ inputs.start }}-${{ inputs.end }}-${{ inputs.alphabet }} | |
gh pr create --title="[action] ${{ inputs.start }}-${{ inputs.end }}-${{ inputs.alphabet }}" --body="start:${{ inputs.start }} end:${{ inputs.end }} alphabet:${{ inputs.alphabet }}" --base="main" --head="${{ inputs.start }}-${{ inputs.end }}-${{ inputs.alphabet }}" | |
env: | |
GH_TOKEN: ${{ github.token }} |