Skip to content

Commit 210a651

Browse files
authored
Update build-and-publish.yaml
Signed-off-by: Kevin Z <zyxkad@gmail.com>
1 parent d7183c8 commit 210a651

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/build-and-publish.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ name: Build and Publish
33
on:
44
workflow_dispatch:
55
push:
6-
pull_request:
6+
pull_request_target:
77
types:
88
- opened
9+
- reopened
910
- synchronize
1011

1112
jobs:
@@ -17,7 +18,7 @@ jobs:
1718
- name: Generate Name
1819
id: name
1920
run: |
20-
if [[ "${{ github.event_name }}" == 'pull_request' ]]; then
21+
if [[ "${{ github.event_name }}" == 'pull_request_target' ]]; then
2122
suffix="PR ${{ github.event.number }}"
2223
else
2324
ref="${{ github.ref }}"
@@ -34,7 +35,9 @@ jobs:
3435
uses: IntelligenceModding/actions/.github/workflows/build-and-test.yaml@master
3536
with:
3637
build_name: ${{ needs.generate-artifact-name.outputs.name }}
37-
pr: ${{ github.event_name == 'pull_request' && github.event.number || '' }}
38+
pr: ${{ github.event_name == 'pull_request_target' && github.event.number || '' }}
39+
pr_ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.ref || '' }}
40+
pr_repo: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name || '' }}
3841
check: ${{ github.event_name != 'push' }}
3942
java-version: ''
4043

@@ -44,14 +47,13 @@ jobs:
4447
needs:
4548
- build-and-test
4649
steps:
47-
- name: Checkout sources
50+
- name: Checkout Sources
4851
uses: actions/checkout@v4
4952
- name: Setup Java
5053
uses: actions/setup-java@v4
5154
with:
5255
distribution: 'microsoft'
5356
cache: 'gradle'
54-
java-version: '17'
5557
java-version-file: '.tool-versions'
5658
- name: Setup Gradle
5759
uses: gradle/actions/setup-gradle@v4

0 commit comments

Comments
 (0)