From dc329f5eaa09c42f7469d193ff7281b70771325c Mon Sep 17 00:00:00 2001 From: Ben Gitter Date: Sat, 19 Oct 2024 23:58:41 +0000 Subject: [PATCH] Debug --- .github/workflows/extract-openai-types.yml | 26 ++++++---------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/.github/workflows/extract-openai-types.yml b/.github/workflows/extract-openai-types.yml index e6e4cc3..6da27fc 100644 --- a/.github/workflows/extract-openai-types.yml +++ b/.github/workflows/extract-openai-types.yml @@ -1,47 +1,35 @@ name: Extract OpenAI Types - on: push: branches: - - main - workflow_dispatch: # Allow manual triggering + - master + workflow_dispatch: jobs: extract-types: runs-on: ubuntu-latest steps: - # Step 1: Check out the repository - name: Checkout current repository uses: actions/checkout@v4 - # Step 2: Fetch the latest OpenAI release - name: Download latest OpenAI release zip run: | - # Get the latest release version number latest_release=$(curl -s https://api.github.com/repos/openai/openai-python/releases/latest | jq -r '.tag_name') - # Download the latest release zip - curl -L https://github.com/openai/openai-python/archive/refs/tags/${latest_release}.zip -o openai-latest.zip + curl -L "https://github.com/openai/openai-python/archive/refs/tags/${latest_release}.zip" -o openai-latest.zip - # Step 3: Extract the `types` folder from the release - name: Extract `types` folder run: | - # Unzip the archive unzip openai-latest.zip -d openai-package - # Copy only the /src/openai/types folder mkdir -p lmos-openai-types - cp -r lmos-openai-types/openai-python-${latest_release}/src/openai/types openai-types/ + cp -r openai-package/openai-python-*/src/openai/types lmos-openai-types/ - # Step 4: Commit the extracted types to a new branch - name: Commit and push changes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - # Configure git git config --global user.name "GitHub Actions" git config --global user.email "actions@github.com" - # Create a new branch git checkout -b openai-types-extracted - # Add the new files git add lmos-openai-types - # Commit the changes git commit -m "Extracted types from OpenAI ${latest_release}" - # Push the new branch - git push origin openai-types-extracted + git push origin openai-types-extracted \ No newline at end of file