Skip to content

Commit 971c2c6

Browse files
authored
DAT-21227: Modify GitHub Actions workflow for pull requests (#344)
* Modify GitHub Actions workflow for pull requests Updated pull request trigger to use 'pull_request_target' and added authorization job. * Update dependencies for build-test and dependabot-automerge
1 parent 536e179 commit 971c2c6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build and Test
22

33
on:
44
workflow_dispatch:
5-
pull_request:
5+
pull_request_target:
66
types:
77
- opened
88
- reopened
@@ -15,11 +15,18 @@ permissions:
1515
id-token: write
1616

1717
jobs:
18+
authorize:
19+
environment: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
20+
runs-on: ubuntu-latest
21+
steps:
22+
- run: "true"
23+
1824
build-test:
25+
needs: authorize
1926
uses: liquibase/build-logic/.github/workflows/os-extension-test.yml@main
2027
secrets: inherit
2128

2229
dependabot-automerge:
23-
needs: build-test
30+
needs: [ build-test,authorize ]
2431
uses: liquibase/build-logic/.github/workflows/dependabot-automerge.yml@main
2532
secrets: inherit

0 commit comments

Comments
 (0)