Skip to content
Latchkey

🛠️ Auto-refresh 3-D-Print Checklist (Wiki) workflow (ISS-Mimic/Mimic)

The 🛠️ Auto-refresh 3-D-Print Checklist (Wiki) workflow from ISS-Mimic/Mimic, explained and optimized by Latchkey.

D

CI health: D - needs work

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

Grade your own workflow free or run it on Latchkey →
Source: ISS-Mimic/Mimic.github/workflows/update-wiki-print-table.ymlLicense MITView source

What it does

This is the 🛠️ Auto-refresh 3-D-Print Checklist (Wiki) workflow from the ISS-Mimic/Mimic repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.

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

The workflow

workflow (.yml)
# .github/workflows/update-wiki-print-table.yml
name: 🛠️ Auto-refresh 3-D-Print Checklist (Wiki)

on:
  # run every time anything in 3D_Printing/ changes…
  push:
    paths: ["3D_Printing/**"]
  # …plus a nightly safety-net
  schedule:
    - cron: "0 3 * * *"     # 03:00 UTC

permissions:
  contents: read            # checkout needs this (wiki pushes use PAT below)

jobs:
  refresh:
    runs-on: ubuntu-latest

    steps:
    # 1️⃣  Pull main repo - for the generator script & models
    - name: Check out code
      uses: actions/checkout@v4

    # 2️⃣  Clone the Wiki repo (needs a token with *write* access)
    - name: Clone wiki repo
      env:
        # Use your PAT if set, otherwise the built-in token
        GH_PAT: ${{ secrets.GH_PAT }}
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      run: |
        TOKEN="${GH_PAT:-$GITHUB_TOKEN}"
        git clone "https://x-access-token:${TOKEN}@github.com/${{ github.repository }}.wiki.git" wiki

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

    # 4️⃣  Install dependencies
    - name: Install deps
      run: |
        python -m pip install --upgrade pip
        pip install PyGithub tabulate markdown-it-py pyyaml

    # 5️⃣  Regenerate the table (preserve check-marks, merge .meta.yml)
    - name: Generate checklist markdown
      env:
        GH_PAT: ${{ secrets.GH_PAT }}
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      run: |
        python scripts/make_print_table.py \
          --wiki-path wiki \
          --page "Build-Instruction:-3D-Printed-Parts.md"

    # 6️⃣  Commit & push only if the file changed
    - name: Commit & push update
      env:
        GH_PAT: ${{ secrets.GH_PAT }}
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      run: |
        set -e
        cd wiki
        git add "Build-Instruction:-3D-Printed-Parts.md"

        if git diff --cached --quiet; then
          echo "No changes - wiki already up to date."
        else
          git config user.name  "Mimic-CI Bot"
          git config user.email "actions@github.com"
          git commit -m "docs: auto-refresh 3-D print checklist [skip ci]"
          TOKEN="${GH_PAT:-$GITHUB_TOKEN}"
          git push "https://x-access-token:${TOKEN}@github.com/${{ github.repository }}.wiki.git" HEAD:master
        fi

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.

# .github/workflows/update-wiki-print-table.yml
name: 🛠️ Auto-refresh 3-D-Print Checklist (Wiki)
 
on:
  # run every time anything in 3D_Printing/ changes…
  push:
    paths: ["3D_Printing/**"]
  # …plus a nightly safety-net
  schedule:
    - cron: "0 3 * * *"     # 03:00 UTC
 
permissions:
  contents: read            # checkout needs this (wiki pushes use PAT below)
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  refresh:
    timeout-minutes: 30
    runs-on: latchkey-small
 
    steps:
    # 1️⃣  Pull main repo - for the generator script & models
    - name: Check out code
      uses: actions/checkout@v4
 
    # 2️⃣  Clone the Wiki repo (needs a token with *write* access)
    - name: Clone wiki repo
      env:
        # Use your PAT if set, otherwise the built-in token
        GH_PAT: ${{ secrets.GH_PAT }}
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      run: |
        TOKEN="${GH_PAT:-$GITHUB_TOKEN}"
        git clone "https://x-access-token:${TOKEN}@github.com/${{ github.repository }}.wiki.git" wiki
 
    # 3️⃣  Set up Python
    - name: Set up Python 3.11
      uses: actions/setup-python@v5
      with:
        cache: 'pip'
        python-version: "3.11"
 
    # 4️⃣  Install dependencies
    - name: Install deps
      run: |
        python -m pip install --upgrade pip
        pip install PyGithub tabulate markdown-it-py pyyaml
 
    # 5️⃣  Regenerate the table (preserve check-marks, merge .meta.yml)
    - name: Generate checklist markdown
      env:
        GH_PAT: ${{ secrets.GH_PAT }}
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      run: |
        python scripts/make_print_table.py \
          --wiki-path wiki \
          --page "Build-Instruction:-3D-Printed-Parts.md"
 
    # 6️⃣  Commit & push only if the file changed
    - name: Commit & push update
      env:
        GH_PAT: ${{ secrets.GH_PAT }}
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      run: |
        set -e
        cd wiki
        git add "Build-Instruction:-3D-Printed-Parts.md"
 
        if git diff --cached --quiet; then
          echo "No changes - wiki already up to date."
        else
          git config user.name  "Mimic-CI Bot"
          git config user.email "actions@github.com"
          git commit -m "docs: auto-refresh 3-D print checklist [skip ci]"
          TOKEN="${GH_PAT:-$GITHUB_TOKEN}"
          git push "https://x-access-token:${TOKEN}@github.com/${{ github.repository }}.wiki.git" HEAD:master
        fi
 

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