-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (76 loc) · 2.61 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Node CI Workflow
#
# The parameters are defaulted at the org level but can be overridden on the repository.
# See the github-automation repo for more documentation
#
on:
push:
branches:
- dev
- main
pull_request:
branches:
- dev
- main
issue_comment:
inputs:
workflowBranch:
description: 'Branch of the reusable workflow. Defaults to main, select dev for testing only.'
required: true
default: 'main'
type: choice
options:
- dev
- main
workflow_dispatch:
inputs:
workflowBranch:
description: 'Branch of the reusable workflow. Defaults to main, select dev for testing only.'
required: true
default: 'main'
type: choice
options:
- dev
- main
jobs:
echo-inputs:
name: Repo Workflow Debugging
runs-on: ubuntu-latest
steps:
- name: Check Repo Vars
run: |
echo "*** Start - Check inputs in repo workflow ***"
echo "Node Version: ${{ vars.NODE_VERSION }}"
echo "Lint Required: ${{ vars.IS_LINT_REQUIRED }}"
echo "Format Check Required: ${{ vars.IS_FORMAT_CHECK_REQUIRED }}"
echo "Apply Patches Required: ${{ vars.IS_APPLY_PATCHES_REQUIRED }}"
echo "Unit Tests Required: ${{ vars.IS_UNIT_TESTS_REQUIRED }}"
echo "*** End - Check inputs in repo workflow ***"
ci-test-only:
if: ${{ github.event.inputs.workflowBranch == 'dev' }}
uses: shardeum/github-automation/.github/workflows/reusable-node-ci.yml@dev
permissions:
issues: write
pull-requests: write
contents: write
with:
node-version: ${{ vars.NODE_VERSION }}
lint-required: ${{ vars.IS_LINT_REQUIRED == 'true' }}
format-check-required: ${{ vars.IS_FORMAT_CHECK_REQUIRED == 'true' }}
apply-patches-required: ${{ vars.IS_APPLY_PATCHES_REQUIRED == 'true' }}
unit-tests-required: ${{ vars.IS_UNIT_TESTS_REQUIRED == 'true' }}
secrets: inherit
ci:
if: ${{ github.event.inputs.workflowBranch == 'main' || !github.event.inputs.workflowBranch }}
uses: shardeum/github-automation/.github/workflows/reusable-node-ci.yml@main
permissions:
issues: write
pull-requests: write
contents: write
with:
node-version: ${{ vars.NODE_VERSION }}
lint-required: ${{ vars.IS_LINT_REQUIRED == 'true' }}
format-check-required: ${{ vars.IS_FORMAT_CHECK_REQUIRED == 'true' }}
apply-patches-required: ${{ vars.IS_APPLY_PATCHES_REQUIRED == 'true' }}
unit-tests-required: ${{ vars.IS_UNIT_TESTS_REQUIRED == 'true' }}
secrets: inherit