42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
---
|
|
name: Apply PR changes to serverless
|
|
on:
|
|
pull_request_target:
|
|
types:
|
|
- closed
|
|
- labeled
|
|
|
|
jobs:
|
|
apply-patch:
|
|
name: Apply patch
|
|
runs-on: ubuntu-latest
|
|
# Only react to merged PRs for security reasons.
|
|
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
|
|
if: >
|
|
github.event.pull_request.merged
|
|
&& (
|
|
(
|
|
github.event.action == 'closed'
|
|
&& contains(github.event.pull_request.labels.*.name, 'apply-to-serverless')
|
|
)
|
|
||
|
|
(
|
|
github.event.action == 'labeled'
|
|
&& github.event.label.name == 'apply-to-serverless'
|
|
)
|
|
)
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
repository: elastic/elasticsearch-js
|
|
ref: main
|
|
path: stack
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
repository: elastic/elasticsearch-serverless-js
|
|
ref: main
|
|
path: serverless
|
|
- name: Apply patch from stack to serverless
|
|
run: |
|
|
$GITHUB_WORKSPACE/stack/.github/serverless-patch.sh
|