Skip to content

Commit cd9729f

Browse files
committed
EX-319: fix worklows v8
1 parent 46e8d28 commit cd9729f

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

.github/workflows/code_review.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,31 +78,30 @@ jobs:
7878
- name: Determine Run Mode
7979
id: run_mode
8080
run: |
81+
IS_DRY_RUN="false" # Значення за замовчуванням
8182
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
82-
# Якщо запуск ручний
8383
if [[ "${{ github.event.inputs.mode }}" == "external_pr" ]]; then
84-
echo "DRY_RUN=true" >> $GITHUB_ENV
84+
IS_DRY_RUN="true"
8585
else
86-
echo "DRY_RUN=${{ github.event.inputs.dry_run_this_repo }}" >> $GITHUB_ENV
86+
IS_DRY_RUN="${{ github.event.inputs.dry_run_this_repo }}"
8787
fi
88-
else
89-
# Якщо запуск автоматичний на PR
90-
echo "DRY_RUN=false" >> $GITHUB_ENV
9188
fi
89+
echo "is_dry_run=$IS_DRY_RUN" >> "$GITHUB_OUTPUT"
9290
- name: Run Code Review Agent
9391
working-directory: ./agent
9492
run: |
9593
export TARGET_REPO_PATH="../target_repo"
9694
poetry run python main.py
9795
env:
98-
DRY_RUN: ${{ env.DRY_RUN }}
96+
DRY_RUN: ${{ steps.run_mode.outputs.is_dry_run }}
9997
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
10098
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10199
GITHUB_PR_NUMBER: ${{ github.event.inputs.target_pr_number || github.event.pull_request.number }}
102100
GITHUB_REPOSITORY: ${{ github.event.inputs.target_repo_url || github.repository }}
103101

104102
- name: Upload Review Artifact
103+
if: steps.run_mode.outputs.is_dry_run == 'true'
105104
uses: actions/upload-artifact@v4
106105
with:
107106
name: code-review-report-${{ github.run_id }}
108-
path: target_repo/review_report.md
107+
path: agent/review_report.md

0 commit comments

Comments
 (0)