Skip to content

Commit 689b963

Browse files
committed
fix workflows for forked prs
1 parent ec407a2 commit 689b963

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

.github/workflows/federation-compatibility.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Federation Compatibility
22

33
on:
44
workflow_call:
5+
inputs:
6+
fork:
7+
default: false
8+
type: boolean
59
secrets:
610
token:
711
required: true
@@ -15,7 +19,14 @@ jobs:
1519
working-directory: integration/federation-compatibility
1620

1721
steps:
18-
- uses: actions/checkout@v3
22+
- name: Checkout Repository
23+
if: ${{ inputs.fork }} == false
24+
uses: actions/checkout@v3
25+
- name: Checkout Repository (fork mode)
26+
if: ${{ inputs.fork }} == true
27+
uses: actions/checkout@v3
28+
with:
29+
ref: ${{ github.event.pull_request.head.sha }}
1930

2031
- name: Validate Gradle wrapper
2132
uses: gradle/wrapper-validation-action@v1

.github/workflows/federation-composition.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Federation Composition Test
22

33
on:
44
workflow_call:
5+
inputs:
6+
fork:
7+
default: false
8+
type: boolean
59

610
jobs:
711
federation-composition-test:
@@ -12,7 +16,14 @@ jobs:
1216
working-directory: examples/federation
1317

1418
steps:
15-
- uses: actions/checkout@v3
19+
- name: Checkout Repository
20+
if: ${{ inputs.fork }} == false
21+
uses: actions/checkout@v3
22+
- name: Checkout Repository (fork mode)
23+
if: ${{ inputs.fork }} == true
24+
uses: actions/checkout@v3
25+
with:
26+
ref: ${{ github.event.pull_request.head.sha }}
1627

1728
- name: Set up Java 17
1829
uses: actions/setup-java@v3

.github/workflows/pr-check-federation.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ on:
1111
jobs:
1212
federation-compatibility:
1313
uses: ./.github/workflows/federation-compatibility.yml
14+
with:
15+
fork: true
1416
secrets:
1517
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
1618

1719
federation-composition:
18-
needs: build-libraries
1920
uses: ./.github/workflows/federation-composition.yml
21+
with:
22+
fork: true

0 commit comments

Comments
 (0)