Skip to content

FeatureAdd CLI runner and setup CI/CD workflow #1

FeatureAdd CLI runner and setup CI/CD workflow

FeatureAdd CLI runner and setup CI/CD workflow #1

Workflow file for this run

name: Diff-Guard CI
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
analyze-risk:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Crucial: Fetches all history so both base and head commits are available locally
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Diff-Guard Analysis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python cli.py \
--base ${{ github.event.pull_request.base.sha }} \
--head ${{ github.event.pull_request.head.sha }} \
--post-comment \
--pr-number ${{ github.event.pull_request.number }} \
--github-repository ${{ github.repository }}