Skip to content

Iteration 3.3 - trying to commit changes to codium-proxy. #77

Iteration 3.3 - trying to commit changes to codium-proxy.

Iteration 3.3 - trying to commit changes to codium-proxy. #77

Workflow file for this run

name: ci
on:
push:
branches:
- docs-context
jobs:
update-docs-context:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Run build script
run: python scripts/build_docs_context.py # this will create a .llm_context.txt file in repo-root/.llm_context.txt
- name: Clone codium-proxy
env:
CODIUM_PROXY_TOKEN: ${{ secrets.CODIUM_PROXY_TOKEN }}
run: |
git clone https://x-access-token:[email protected]/Codium-ai/codium-proxy.git
cd codium-proxy
echo "Successfully cloned codium-proxy"
- name: Make updates to codium-proxy docs content
working-directory: codium-proxy
run: |
# write .llm_context content to documentation/docs_context.txt
echo "$(cat ../.llm_context.txt)" > documentation/docs_context.txt
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b update-docs-context-branch
git add documentation/docs_context.txt
git commit -m "Automated update to docs_context.txt"
- name: Push branch to remote
working-directory: codium-proxy
env:
CODIUM_PROXY_TOKEN: ${{ secrets.CODIUM_PROXY_TOKEN }}
run: |
git push -u origin update-docs-context-branch
- name: Create pull request
uses: actions/github-script@v6
with:
script: |
const { data: pullRequest } = await github.rest.pulls.create({
owner: 'Codium-ai',
repo: 'codium-proxy',
title: 'Automated update to docs_context.txt',
head: 'update-docs-context-branch',
base: 'main', # Adjust this if the target branch is different
body: 'This is an automated pull request to update docs_context.txt',
});
core.setOutput('pull_request_url', pullRequest.html_url);