File size: 1,196 Bytes
6dbbaa1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b0c4e1c
6dbbaa1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Update AI Changelog on Push to Main

on:
  push:
    branches: [main]
    paths-ignore:
      - "AI_CHANGELOG.md"

jobs:
  update-changelog:
    runs-on: ubuntu-latest

    permissions:
      contents: write
      pull-requests: write

    steps:

    - name: Checkout code
      uses: actions/checkout@v4
      with:
        token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
        fetch-depth: 0

    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: 3.11
        cache: pip

    - name: Install Python libraries
      run: |
        pip install --user ai_changelog==0.0.9

    - name: Execute script and prepend to AI_CHANGELOG.md
      env:
        OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
        LANGCHAIN_API_KEY: ${{ secrets.LANGCHAIN_API_KEY }}
        LANGCHAIN_PROJECT: ai-changelog-langchain-streamlit-demo
        LANGCHAIN_ENDPOINT: https://api.smith.langchain.com
        LANGCHAIN_TRACING_V2: true
      run: ai_changelog origin/main^..origin/main

    - name: Commit changes
      with:
        COMMIT_MESSAGE: "Update AI Changelog"
        file_pattern: "AI_CHANGELOG.md"
      uses: stefanzweifel/git-auto-commit-action@v4