testing new backend changes #23
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update Changelog | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| update-changelog: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| ref: main | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r backend_api/requirements.txt | |
| - name: Run main.py | |
| env: | |
| API_KEY_GITHUB: ${{ secrets.API_KEY_GITHUB }} | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| OWNER: ${{ secrets.OWNER }} | |
| REPO: ${{ secrets.REPO }} | |
| run: python backend_api/main.py | |
| - name: Debug current branch | |
| run: git branch --show-current | |
| - name: Commit and push changes | |
| run: | | |
| git config --local user.name "github-actions[bot]" | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git add changelog.json | |
| git commit -m "Update changelog.json" || echo "No changes to commit" | |
| git push origin main | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} |