xiaohuohumax / issue-game

This is an Action project that allows you to play a game on GitHub Issue; 这是一个可以在 GitHub Issue 上玩游戏的 Action 项目;
MIT License
0 stars 0 forks source link
action game issue tic-tac-toe-game

Issue Game

This is an Action project that allows you to play a game on GitHub Issue

中文 | English

🎮 Game play

Click the following link to start the game:

📖 Usage

Create a file named .github/workflows/Issue-game.yml in your GitHub repository and add the following content:

[!Note] Please ensure that the Token has read and write permissions for Issues and Labels (Settings => Actions => General).

name: Issue Game

on:
  issues:
    types:
      - opened
  issue_comment:
    types:
      - created

jobs:
  Issue-game:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Issue Game Action
        uses: xiaohuohumax/issue-game@v1
          with:
            token: ${{ secrets.GITHUB_TOKEN }}
            # language: "en"
            # ttt-issue-title-pattern: "^play\\s+tic[-_]?tac[-_]?toe"
            # ttt-label: "game-ttt-room"
            # ttt-room-title: "♟|{name}| {state}| {vs}| {result}"
            # ttt-extra-labels: |
            #   game-ttt

⚙ Parameters

Name Type Description Default Value
token string GitHub token for authentication {{ github.token }}
language string Language for the game: en, zh "en"
ttt-issue-title-pattern string Tic-Tac-Toe game: regex for creating room Issue title "^play\s+tic[-_]?tac[-_]?toe"
ttt-label string Tic-Tac-Toe game: issue label name "game-ttt-room"
ttt-room-title string Tic-Tac-Toe game: room title {name} {state} {vs} {creator} {next} {winner} {result} "♟|{name}| {state}| {vs}| {result}"
ttt-extra-labels string[] Tic-Tac-Toe game: extra issue labelsIssue "game-ttt"