-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54160db
commit 869b880
Showing
2 changed files
with
65 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,53 @@ | ||
name: build | ||
name: Build repository | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
run_parallel: | ||
description: 'Run jobs in parallel' | ||
required: false | ||
type: boolean | ||
default: true | ||
self_hosted: | ||
description: 'Run on self-hosted runner' | ||
required: false | ||
type: boolean | ||
default: true | ||
cypress: | ||
description: 'Run cypress' | ||
required: false | ||
type: boolean | ||
default: false | ||
playwright: | ||
description: 'Run playwright' | ||
required: false | ||
type: boolean | ||
default: false | ||
playwright_spec_param: | ||
type: string | ||
description: 'Run specific playwright test(s) (optional). Example: landing-page.spec.ts' | ||
required: false | ||
push: | ||
pull_request: | ||
types: [opened, ready_for_review] | ||
pull_request_review: | ||
types: [submitted] | ||
|
||
jobs: | ||
build: | ||
if: ${{ github.event_name != 'pull_request_review' || github.event.review.state == 'approved' }} | ||
uses: datavisyn/github-workflows/.github/workflows/build-node-python.yml@main | ||
secrets: inherit | ||
# Boolean inputs are tricky in Github Actions. Their default is not honored in non-workflow-dispatch actions, so setting a default on push is tricky: https://stackoverflow.com/a/73495922 | ||
# To get on push true, use !contains(inputs.myInput, 'false') | ||
# To get on push false, use contains(inputs.myInput, 'true') | ||
with: | ||
run_parallel: ${{ !contains(inputs.run_parallel, 'false') }} # true except if box is not checked | ||
runs_on: ${{ (!contains(inputs.self_hosted, 'false') && 'self-hosted') || null }} # self-hosted except if box is not checked | ||
cypress_enable: true | ||
cypress_run_because_flag: ${{ inputs.cypress == true }} | ||
cypress_run_because_flag: ${{ inputs.cypress == true || github.event_name == 'pull_request' || github.event.review.state == 'approved' }} | ||
cypress_runs_on: ${{ (!contains(inputs.self_hosted, 'false') && 'self-hosted') || null }} # self-hosted except if box is not checked | ||
playwright_enable: false | ||
playwright_run_because_flag: ${{ inputs.playwright == true || github.event_name == 'pull_request' || github.event.review.state == 'approved' }} | ||
playwright_spec_param: ${{ inputs.playwright_spec_param }} | ||
playwright_runs_on: ${{ (!contains(inputs.self_hosted, 'false') && 'self-hosted') || null }} # self-hosted except if box is not checked |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,32 @@ | ||
name: release | ||
name: Create a new release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_version: | ||
type: string | ||
description: 'The next version to release' | ||
required: true | ||
pull_request: | ||
types: [closed] | ||
branches: | ||
- 'main' | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
release: | ||
create_release_pr: | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
uses: datavisyn/github-workflows/.github/workflows/release-source.yml@main | ||
secrets: inherit | ||
secrets: inherit | ||
with: | ||
release_version: ${{ inputs.release_version }} | ||
is_helm_chart: false | ||
|
||
post_merge_release: | ||
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'Release') }} | ||
uses: datavisyn/github-workflows/.github/workflows/release-post-merge.yml@main | ||
secrets: inherit | ||
with: | ||
pr_title: ${{ github.event.pull_request.title }} | ||
pr_number: ${{ github.event.pull_request.number }} | ||
repository_owner: ${{ github.repository_owner }} | ||
repository_name: ${{ github.event.repository.name }} |