@@ -52,27 +52,17 @@ jobs:
52
52
name : Gradle Check
53
53
timeout-minutes : 30
54
54
steps :
55
- # The run-check job will be triggered if a fork made changes to gradle projects.
56
- # We don't want forks to make changes to gradle projects.
57
- # So we fail the job if the PR is from a fork, it will make the required CI check fail.
58
- - name : Check if PR is from a fork
59
- id : check-if-pr-is-from-fork
60
- if : github.event_name == 'pull_request'
61
- shell : bash
62
- run : |
63
- if [ "${{ github.event.pull_request.head.repo.fork }}" == "true" ]; then
64
- echo "PR is from a fork. Exiting workflow..."
65
- exit 78
66
- fi
67
55
- name : Checkout Airbyte
68
56
uses : actions/checkout@v4
69
57
- uses : actions/setup-java@v3
70
58
with :
71
59
distribution : " zulu"
72
60
java-version : " 21"
73
61
- name : Docker login
74
- # Some tests use testcontainers which pull images from DockerHub.
75
- uses : docker/login-action@v1
62
+ # We login to benefit from increased rate limits for docker pulls
63
+ # We can't do it on forks as pull_requests events on forks do not have access to GH secrets
64
+ if : github.event.pull_request.head.repo.fork != true
65
+ uses : docker/login-action@v3
76
66
with :
77
67
username : ${{ secrets.DOCKER_HUB_USERNAME }}
78
68
password : ${{ secrets.DOCKER_HUB_PASSWORD }}
@@ -148,7 +138,7 @@ jobs:
148
138
runs-on : ubuntu-latest
149
139
needs :
150
140
- run-check
151
- if : success()
141
+ if : ${{ success() && github.event.pull_request.head.repo.fork != true }}
152
142
steps :
153
143
- name : Get Previous Workflow Status
154
144
uses :
Mercymeilya/[email protected]
0 commit comments