Skip to content

Commit f22876d

Browse files
authored
Fix github actions on forks PR (#3106)
1 parent 7207a18 commit f22876d

19 files changed

+58
-41
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,12 @@
1414
directory: "/"
1515
schedule:
1616
interval: "weekly"
17-
open-pull-requests-limit: 5
17+
open-pull-requests-limit: 5
18+
groups:
19+
github-actions:
20+
update-types:
21+
- major
22+
- minor
23+
- patch
24+
25+

.github/workflows/accessTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
if: matrix.os.name != 'macos'
4343
uses: actions/checkout@v4
4444
with:
45-
ref: ${{ github.event.pull_request.head.sha }}
45+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
4646

4747
- name: Setup Go with cache
4848
if: matrix.os.name != 'macos'

.github/workflows/analysis.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Checkout code
2020
uses: actions/checkout@v4
2121
with:
22-
ref: ${{ github.event.pull_request.head.sha }}
22+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
2323

2424
- name: Setup Go with cache
2525
uses: jfrog/.github/actions/install-go-with-cache@main
@@ -33,6 +33,8 @@ jobs:
3333
steps:
3434
- name: Checkout Source
3535
uses: actions/checkout@v4
36+
with:
37+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
3638

3739
- name: Setup Go with cache
3840
uses: jfrog/.github/actions/install-go-with-cache@main
@@ -46,6 +48,8 @@ jobs:
4648
steps:
4749
- name: Checkout Source
4850
uses: actions/checkout@v4
51+
with:
52+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
4953

5054
- name: Setup Go with cache
5155
uses: jfrog/.github/actions/install-go-with-cache@main
@@ -59,6 +63,8 @@ jobs:
5963
steps:
6064
- name: Checkout Source
6165
uses: actions/checkout@v4
66+
with:
67+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
6268

6369
- name: Run ShellCheck
6470
uses: ludeeus/action-shellcheck@master
@@ -70,6 +76,8 @@ jobs:
7076
steps:
7177
- name: Checkout Source
7278
uses: actions/checkout@v4
79+
with:
80+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
7381

7482
- name: Check for uncommented replace instructions on JFrog dependencies
7583
run: |

.github/workflows/artifactoryTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
if: matrix.os.name != 'macos'
4343
uses: actions/checkout@v4
4444
with:
45-
ref: ${{ github.event.pull_request.head.sha }}
45+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
4646

4747
- name: Setup Go with cache
4848
if: matrix.os.name != 'macos'

.github/workflows/distributionTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Checkout code
3030
uses: actions/checkout@v4
3131
with:
32-
ref: ${{ github.event.pull_request.head.sha }}
32+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
3333

3434
- name: Run Distribution tests
3535
run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.distribution --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --jfrog.user=${{ secrets.PLATFORM_USER }} --ci.runId=${{ runner.os }}-distribution

.github/workflows/dockerTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Checkout code
2828
uses: actions/checkout@v4
2929
with:
30-
ref: ${{ github.event.pull_request.head.sha }}
30+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
3131

3232
- name: Setup Go with cache
3333
uses: jfrog/.github/actions/install-go-with-cache@main

.github/workflows/goTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Checkout code
2828
uses: actions/checkout@v4
2929
with:
30-
ref: ${{ github.event.pull_request.head.sha }}
30+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
3131

3232
- name: Setup Go with cache
3333
uses: jfrog/.github/actions/install-go-with-cache@main

.github/workflows/gradleTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
if: matrix.os.name != 'macos'
4343
uses: actions/checkout@v4
4444
with:
45-
ref: ${{ github.event.pull_request.head.sha }}
45+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
4646

4747
- name: Setup Java
4848
if: matrix.os.name != 'macos'

.github/workflows/lifecycleTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Checkout code
2929
uses: actions/checkout@v4
3030
with:
31-
ref: ${{ github.event.pull_request.head.sha }}
31+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
3232

3333
- name: Setup Go with cache
3434
uses: jfrog/.github/actions/install-go-with-cache@main

.github/workflows/mavenTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
if: matrix.os.name != 'macos'
4040
uses: actions/checkout@v4
4141
with:
42-
ref: ${{ github.event.pull_request.head.sha }}
42+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
4343

4444
- name: Setup Go with cache
4545
if: matrix.os.name != 'macos'

0 commit comments

Comments
 (0)