feat(ci): support forked repos by checking out using target of pull request (#4193)
This commit is contained in:
parent
5cae2ce400
commit
8ce77e23ba
5
.github/workflows/ci-cd-trigger.yml
vendored
5
.github/workflows/ci-cd-trigger.yml
vendored
@ -6,7 +6,7 @@ on:
|
||||
- release/*
|
||||
- develop
|
||||
- main
|
||||
pull_request:
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
- ready_for_review
|
||||
@ -20,6 +20,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
|
||||
- name: Cache node modules
|
||||
id: cache
|
||||
@ -60,6 +62,7 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
|
1
.github/workflows/cypress-run.yml
vendored
1
.github/workflows/cypress-run.yml
vendored
@ -33,6 +33,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
path: './frontend-monorepo'
|
||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
|
||||
# Restore node_modules from cache if possible
|
||||
- name: Restore node_modules from cache
|
||||
|
2
.github/workflows/lint-pr.yml
vendored
2
.github/workflows/lint-pr.yml
vendored
@ -11,6 +11,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
|
2
.github/workflows/publish-dist.yml
vendored
2
.github/workflows/publish-dist.yml
vendored
@ -19,6 +19,8 @@ jobs:
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
|
||||
- name: Set up QEMU
|
||||
id: quemu
|
||||
|
Loading…
Reference in New Issue
Block a user