Merge pull request #60 from sudo-whodo/dependabot/pip/pr-diff-bot/mai… #189
This file contains 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: Build | |
on: | |
pull_request_target: | |
branches: [main] | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# Add a condition to ensure we're running on the PR's head | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Important: check out the PR head for pull_request_target | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r pr-diff-bot/requirements.txt | |
- name: Build Docker image | |
run: docker build -t pr-diff-analyzer . |