Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert #3402 (check-versions running on forks) #3477

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/check-versions.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
name: Check versions

on: pull_request_target
on: pull_request

jobs:
list-pr-changes:
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
- name: Checkout last two commits of the PR
# The last *two* commits are (1) everything in this branch, and (2) the parent of this branch.
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Fetch target base (what we're merging into)
run: git fetch origin ${{ github.event.pull_request.base.ref }}
fetch-depth: 2

- name: Capture version configuration as environment variable
run: echo "VERSION_CONFIG=$(jq -c . < .github/workflows/check-versions/version-config.json)" >> $GITHUB_ENV

- name: Capture changed files as environment variable
run: echo "CHANGED_FILES=$(git diff --name-only HEAD..FETCH_HEAD | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_ENV
run: echo "CHANGED_FILES=$(git diff --name-only HEAD^ | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_ENV

- name: Identify missing changes
id: identify-missing-changes
Expand Down
Loading