Skip to content

Commit ecb6a90

Browse files
authored
Merge pull request #84 from puppetlabs/malikparvez-patch-2
Update mend_ruby.yml
2 parents 6339d68 + e357b8e commit ecb6a90

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/mend_ruby.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,23 @@ on:
88
jobs:
99

1010
mend:
11-
if: github.event.pull_request.head.repo.full_name == github.repository
1211
runs-on: "ubuntu-latest"
13-
14-
env:
15-
BUNDLE_WITHOUT: release_prep
16-
1712
steps:
13+
# If we are on a PR, checkout the PR head sha, else checkout the default branch
14+
- name: "Set the checkout ref"
15+
id: set_ref
16+
run: |
17+
if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then
18+
echo "ref=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
19+
else
20+
echo "ref=${{ github.ref }}" >> $GITHUB_OUTPUT
21+
fi
1822
1923
- name: "checkout"
2024
uses: "actions/checkout@v4"
2125
with:
2226
fetch-depth: 1
27+
ref: ${{ steps.set_ref.outputs.ref }}
2328

2429
- name: "setup ruby"
2530
uses: "ruby/setup-ruby@v1"

0 commit comments

Comments
 (0)