Skip to content

CreateImage Dont modify the title just use the form #435

CreateImage Dont modify the title just use the form

CreateImage Dont modify the title just use the form #435

name: Image Magic or Manage Game Files
on:
issues:
types: [opened]
jobs:
imageMagic:
name: Image Magic
runs-on: ubuntu-latest
if: |
startsWith(github.event.issue.title, 'Transform') ||
startsWith(github.event.issue.title, 'CreateImage') ||
startsWith(github.event.issue.title, 'ImageToGif') ||
startsWith(github.event.issue.title, 'GifBackgroundRemoval')
permissions:
contents: write
issues: write
steps:
- uses: actions/checkout@v4
# Set up a Python 3.12 (64-bit) instance
- name: Setting up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
architecture: "x64"
# Use pip to install the dependencies and then run the script
- name: Start image transform
env:
ISSUE_NUMBER: ${{ github.event.issue.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY_OWNER: ${{ github.repository_owner }}
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
DISALLOWED_WORDS: ${{ vars.DISALLOWED_WORDS }}
run: |
pip install -r requirements.txt
python main.py
# Create new commit with the changed files and push it to GitHub
- name: Commit and push changes
env:
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_AUTHOR: ${{ github.event.issue.user.login }}
run: |
chmod +x ./workflowScripts/pull-then-push.sh
./workflowScripts/pull-then-push.sh
ManageGameFiles:
name: Manage Game Files
runs-on: ubuntu-latest
if: |
startsWith(github.event.issue.title, 'DeleteEntry') ||
startsWith(github.event.issue.title, 'Game') ||
startsWith(github.event.issue.title, 'Vote')
permissions:
contents: write
issues: write
steps:
- uses: actions/checkout@v4
# Set up a Python 3.12 (64-bit) instance
- name: Setting up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
architecture: "x64"
# Use pip to install the dependencies and then run the script
- name: Manage game state
env:
ISSUE_NUMBER: ${{ github.event.issue.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY_OWNER: ${{ github.repository_owner }}
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
run: |
pip install -r ./PlayGame/requirements.txt
python ./PlayGame/manageGameState.py
# Create new commit with the changed files and push it to GitHub
- name: Commit and push changes
env:
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_AUTHOR: ${{ github.event.issue.user.login }}
run: |
chmod +x ./workflowScripts/pull-then-push.sh
./workflowScripts/pull-then-push.sh
CheckCurrentWinners:
name: Start Manage Game Files
needs: ManageGameFiles
if: startsWith(github.event.issue.title, 'Vote')
uses: ./.github/workflows/CheckCurrentWinners.yml
permissions:
contents: write
issues: write