mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-19 18:05:41 -05:00
Bumps [peter-evans/repository-dispatch](https://github.com/peter-evans/repository-dispatch) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/peter-evans/repository-dispatch/releases)
- [Commits](5fc4efd1a4...28959ce8df)
---
updated-dependencies:
- dependency-name: peter-evans/repository-dispatch
dependency-version: 4.0.1
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
102 lines
3.5 KiB
YAML
102 lines
3.5 KiB
YAML
name: Pull Request Workflow
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref_name }}-pr
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
# When an OSS ci start, we trigger an EE one
|
|
trigger-ee:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# PR pre-check: skip if PR from a fork OR EE already has a branch with same name
|
|
- name: Check EE repo for branch with same name
|
|
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false }}
|
|
id: check-ee-branch
|
|
uses: actions/github-script@v8
|
|
with:
|
|
github-token: ${{ secrets.GH_PERSONAL_TOKEN }}
|
|
script: |
|
|
const pr = context.payload.pull_request;
|
|
if (!pr) {
|
|
core.setOutput('exists', 'false');
|
|
return;
|
|
}
|
|
const branch = pr.head.ref;
|
|
const [owner, repo] = 'kestra-io/kestra-ee'.split('/');
|
|
try {
|
|
await github.rest.repos.getBranch({ owner, repo, branch });
|
|
core.setOutput('exists', 'true');
|
|
} catch (e) {
|
|
if (e.status === 404) {
|
|
core.setOutput('exists', 'false');
|
|
} else {
|
|
core.setFailed(e.message);
|
|
}
|
|
}
|
|
|
|
# Targeting pull request (only if not from a fork and EE has no branch with same name)
|
|
- name: Trigger EE Workflow (pull request, with payload)
|
|
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697
|
|
if: ${{ github.event_name == 'pull_request'
|
|
&& github.event.pull_request.number != ''
|
|
&& github.event.pull_request.head.repo.fork == false
|
|
&& steps.check-ee-branch.outputs.exists == 'false' }}
|
|
with:
|
|
token: ${{ secrets.GH_PERSONAL_TOKEN }}
|
|
repository: kestra-io/kestra-ee
|
|
event-type: "oss-updated"
|
|
client-payload: >-
|
|
{"commit_sha":"${{ github.event.pull_request.head.sha }}","pr_repo":"${{ github.repository }}"}
|
|
|
|
file-changes:
|
|
if: ${{ github.event.pull_request.draft == false }}
|
|
name: File changes detection
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
outputs:
|
|
ui: ${{ steps.changes.outputs.ui }}
|
|
translations: ${{ steps.changes.outputs.translations }}
|
|
backend: ${{ steps.changes.outputs.backend }}
|
|
steps:
|
|
- uses: dorny/paths-filter@v3
|
|
id: changes
|
|
with:
|
|
filters: |
|
|
ui:
|
|
- 'ui/**'
|
|
backend:
|
|
- '!{ui,.github}/**'
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
frontend:
|
|
name: Frontend - Tests
|
|
needs: [file-changes]
|
|
if: "needs.file-changes.outputs.ui == 'true'"
|
|
uses: kestra-io/actions/.github/workflows/kestra-oss-frontend-tests.yml@main
|
|
secrets:
|
|
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
backend:
|
|
name: Backend - Tests
|
|
needs: file-changes
|
|
if: "needs.file-changes.outputs.backend == 'true'"
|
|
uses: kestra-io/actions/.github/workflows/kestra-oss-backend-tests.yml@main
|
|
secrets:
|
|
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
GOOGLE_SERVICE_ACCOUNT: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
|
|
|
|
e2e-tests:
|
|
name: E2E - Tests
|
|
uses: kestra-io/actions/.github/workflows/kestra-oss-e2e-tests.yml@main
|
|
|
|
generate-pull-request-docker-image:
|
|
name: Generate PR docker image
|
|
uses: kestra-io/actions/.github/workflows/kestra-oss-pullrequest-publish-docker.yml@main
|