Skip to content

Scrap from Xcode

Scrap from Xcode #90

name: Scrap from Xcode
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 1" # Every Monday at 00:00 UTC
jobs:
scrap:
# update to newer version when available
# https://github.com/actions/runner-images#available-images
runs-on: macos-15
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Use latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
- name: Check Xcode version
run: |
echo "Xcode path: $(xcode-select -p)"
xcodebuild -version
xcodebuild -showsdks
- name: Install Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Run scrape-from-xcode.ts
run: |
deno run --allow-run --allow-read --allow-write scripts/scrape-from-xcode.ts
- name: Generate commit message
id: commit-message
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
MODEL: gpt-4o-mini
run: |
COMMIT_MSG=$(./scripts/commit-message.sh)
echo "COMMIT_MSG=$COMMIT_MSG" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
if: ${{ steps.commit-message.outputs.COMMIT_MSG != '' }}
with:
title: ${{ steps.commit-message.outputs.COMMIT_MSG }}
commit-message: ${{ steps.commit-message.outputs.COMMIT_MSG }}
branch: scrap/xcode