Skip to content
Latchkey

G4F Issue Auto Reply workflow (CharlesPikachu/freeproxy)

The G4F Issue Auto Reply workflow from CharlesPikachu/freeproxy, explained and optimized by Latchkey.

A

CI health: A - excellent

Point runs-on at Latchkey and get caching, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: CharlesPikachu/freeproxy.github/workflows/g4f-issue-reply.ymlLicense Apache-2.0View source

What it does

This is the G4F Issue Auto Reply workflow from the CharlesPikachu/freeproxy repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: G4F Issue Auto Reply

on:
  issues:
    types: [opened]

permissions:
  issues: write
  contents: read

jobs:
  reply:
    runs-on: ubuntu-latest

    if: ${{ github.event.issue.user.type != 'Bot' }}

    timeout-minutes: 10

    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.11"

      - name: Install Dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -U "g4f[all]" requests openai
      
      - name: Create g4f Dirs
        run: mkdir -p ~/.g4f/cookies

      - name: Generate and Post Issue Reply
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          G4F_MODELS: ${{ vars.G4F_MODELS }}
          ECYLT_FREE_GPT_ENABLED: ${{ vars.ECYLT_FREE_GPT_ENABLED || 'true' }}
          ECYLT_FREE_GPT_URL: ${{ vars.ECYLT_FREE_GPT_URL || 'https://api.ecylt.top/v1/free_gpt/chat_json.php' }}
          OPENAI_COMPATIBLE_API_KEY: ${{ secrets.OPENAI_COMPATIBLE_API_KEY }}
          OPENAI_COMPATIBLE_BASE_URL: ${{ vars.OPENAI_COMPATIBLE_BASE_URL }}
          OPENAI_COMPATIBLE_MODEL: ${{ vars.OPENAI_COMPATIBLE_MODEL }}
          G4F_TIMEOUT_SECONDS: "90"
          MAX_REPLY_CHARS: "65536"
        run: |
          python ./scripts/g4f_issue_reply.py

The same workflow, on Latchkey

Estimated ~20% faster on cache hits, plus fewer wasted runs and a safer supply chain. Added and changed lines are highlighted.

name: G4F Issue Auto Reply
 
on:
  issues:
    types: [opened]
 
permissions:
  issues: write
  contents: read
 
jobs:
  reply:
    runs-on: latchkey-small
 
    if: ${{ github.event.issue.user.type != 'Bot' }}
 
    timeout-minutes: 10
 
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4
 
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          cache: 'pip'
          python-version: "3.11"
 
      - name: Install Dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -U "g4f[all]" requests openai
      
      - name: Create g4f Dirs
        run: mkdir -p ~/.g4f/cookies
 
      - name: Generate and Post Issue Reply
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          G4F_MODELS: ${{ vars.G4F_MODELS }}
          ECYLT_FREE_GPT_ENABLED: ${{ vars.ECYLT_FREE_GPT_ENABLED || 'true' }}
          ECYLT_FREE_GPT_URL: ${{ vars.ECYLT_FREE_GPT_URL || 'https://api.ecylt.top/v1/free_gpt/chat_json.php' }}
          OPENAI_COMPATIBLE_API_KEY: ${{ secrets.OPENAI_COMPATIBLE_API_KEY }}
          OPENAI_COMPATIBLE_BASE_URL: ${{ vars.OPENAI_COMPATIBLE_BASE_URL }}
          OPENAI_COMPATIBLE_MODEL: ${{ vars.OPENAI_COMPATIBLE_MODEL }}
          G4F_TIMEOUT_SECONDS: "90"
          MAX_REPLY_CHARS: "65536"
        run: |
          python ./scripts/g4f_issue_reply.py

What changed

What Latchkey heals here

This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:

This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow