pipecraft 0.0.0-releaseit
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +35 -0
- package/.github/actions/calculate-version/action.yml +106 -0
- package/.github/actions/create-pr/action.yml +122 -0
- package/.github/actions/create-release/action.yml +74 -0
- package/.github/actions/create-tag/action.yml +94 -0
- package/.github/actions/detect-changes/action.yml +62 -0
- package/.github/actions/manage-branch/action.yml +113 -0
- package/.github/actions/promote-branch/action.yml +352 -0
- package/.github/example/workflows/job.analyze.code.yml +26 -0
- package/.github/example/workflows/job.analyze.docker.yml +32 -0
- package/.github/example/workflows/job.app.api.deploy.yml +127 -0
- package/.github/example/workflows/job.app.api.test.yml +102 -0
- package/.github/example/workflows/job.app.docs.deploy.yml +40 -0
- package/.github/example/workflows/job.app.docs.test.yml +50 -0
- package/.github/example/workflows/job.app.web.deploy.yml +96 -0
- package/.github/example/workflows/job.app.web.test.yml +49 -0
- package/.github/example/workflows/job.changes.yml +82 -0
- package/.github/example/workflows/job.create-pr.yml +96 -0
- package/.github/example/workflows/job.env-check.yml +43 -0
- package/.github/example/workflows/job.fast-forward.yml +103 -0
- package/.github/example/workflows/job.lint.yml +64 -0
- package/.github/example/workflows/job.pr-name.yml +70 -0
- package/.github/example/workflows/job.pr-squash-name.yml +27 -0
- package/.github/example/workflows/job.tag.yml +38 -0
- package/.github/example/workflows/job.version.yml +99 -0
- package/.github/example/workflows/lib.plugin-base.publish.yml +59 -0
- package/.github/example/workflows/pipe.yml +178 -0
- package/.github/example/workflows/scripts/fastforward.sh +51 -0
- package/.github/example/workflows/scripts/pipe-cleaner.sh +70 -0
- package/.github/scripts/fastforward.sh +51 -0
- package/.github/scripts/pipe-cleaner.sh +70 -0
- package/.github/workflows/pipeline.yml +220 -0
- package/.github/workflows/pr-title-check.yml +70 -0
- package/.github/workflows/publish.yml +39 -0
- package/.pipecraftrc.json +78 -0
- package/.release-it.cjs +71 -0
- package/PIPELINE_TESTING_PLAN.md +499 -0
- package/README.md +1101 -0
- package/TRUNK_FLOW_PLAN.md +401 -0
- package/assets/logo_banner.png +0 -0
- package/assets/logo_banner.webp +0 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +364 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/generators/init.tpl.d.ts +3 -0
- package/dist/generators/init.tpl.d.ts.map +1 -0
- package/dist/generators/init.tpl.js +117 -0
- package/dist/generators/init.tpl.js.map +1 -0
- package/dist/generators/workflows.tpl.d.ts +7 -0
- package/dist/generators/workflows.tpl.d.ts.map +1 -0
- package/dist/generators/workflows.tpl.js +73 -0
- package/dist/generators/workflows.tpl.js.map +1 -0
- package/dist/templates/actions/calculate-version.yml.tpl.d.ts +3 -0
- package/dist/templates/actions/calculate-version.yml.tpl.d.ts.map +1 -0
- package/dist/templates/actions/calculate-version.yml.tpl.js +122 -0
- package/dist/templates/actions/calculate-version.yml.tpl.js.map +1 -0
- package/dist/templates/actions/create-pr.yml.tpl.d.ts +3 -0
- package/dist/templates/actions/create-pr.yml.tpl.d.ts.map +1 -0
- package/dist/templates/actions/create-pr.yml.tpl.js +145 -0
- package/dist/templates/actions/create-pr.yml.tpl.js.map +1 -0
- package/dist/templates/actions/create-tag.yml.tpl.d.ts +3 -0
- package/dist/templates/actions/create-tag.yml.tpl.d.ts.map +1 -0
- package/dist/templates/actions/create-tag.yml.tpl.js +111 -0
- package/dist/templates/actions/create-tag.yml.tpl.js.map +1 -0
- package/dist/templates/actions/detect-changes.yml.tpl.d.ts +3 -0
- package/dist/templates/actions/detect-changes.yml.tpl.d.ts.map +1 -0
- package/dist/templates/actions/detect-changes.yml.tpl.js +79 -0
- package/dist/templates/actions/detect-changes.yml.tpl.js.map +1 -0
- package/dist/templates/actions/manage-branch.yml.tpl.d.ts +3 -0
- package/dist/templates/actions/manage-branch.yml.tpl.d.ts.map +1 -0
- package/dist/templates/actions/manage-branch.yml.tpl.js +130 -0
- package/dist/templates/actions/manage-branch.yml.tpl.js.map +1 -0
- package/dist/templates/actions/promote-branch.yml.tpl.d.ts +3 -0
- package/dist/templates/actions/promote-branch.yml.tpl.d.ts.map +1 -0
- package/dist/templates/actions/promote-branch.yml.tpl.js +362 -0
- package/dist/templates/actions/promote-branch.yml.tpl.js.map +1 -0
- package/dist/templates/workflows/pipeline-path-based.yml.tpl.d.ts +16 -0
- package/dist/templates/workflows/pipeline-path-based.yml.tpl.d.ts.map +1 -0
- package/dist/templates/workflows/pipeline-path-based.yml.tpl.js +652 -0
- package/dist/templates/workflows/pipeline-path-based.yml.tpl.js.map +1 -0
- package/dist/types/index.d.ts +63 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/ast-path-operations.d.ts +287 -0
- package/dist/utils/ast-path-operations.d.ts.map +1 -0
- package/dist/utils/ast-path-operations.js +419 -0
- package/dist/utils/ast-path-operations.js.map +1 -0
- package/dist/utils/config.d.ts +3 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +49 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/github-setup.d.ts +74 -0
- package/dist/utils/github-setup.d.ts.map +1 -0
- package/dist/utils/github-setup.js +418 -0
- package/dist/utils/github-setup.js.map +1 -0
- package/dist/utils/idempotency.d.ts +47 -0
- package/dist/utils/idempotency.d.ts.map +1 -0
- package/dist/utils/idempotency.js +176 -0
- package/dist/utils/idempotency.js.map +1 -0
- package/dist/utils/preflight.d.ts +55 -0
- package/dist/utils/preflight.d.ts.map +1 -0
- package/dist/utils/preflight.js +261 -0
- package/dist/utils/preflight.js.map +1 -0
- package/dist/utils/versioning.d.ts +41 -0
- package/dist/utils/versioning.d.ts.map +1 -0
- package/dist/utils/versioning.js +219 -0
- package/dist/utils/versioning.js.map +1 -0
- package/docs/USER_JOURNEY_ERRORS.md +352 -0
- package/eslint.config.js +77 -0
- package/examples/basic-config.json +41 -0
- package/examples/monorepo-config.json +49 -0
- package/examples/usage.md +289 -0
- package/package.json +58 -0
- package/scripts/debug-workflows.sh +339 -0
- package/scripts/parse-pipeline.js +29 -0
- package/scripts/test-job-order.cjs +140 -0
- package/scripts/validate-pipeline.cjs +379 -0
- package/scripts/verify-job-order.sh +30 -0
- package/src/cli/index.ts +414 -0
- package/src/generators/init.tpl.ts +126 -0
- package/src/generators/workflows.tpl.ts +80 -0
- package/src/templates/actions/calculate-version.yml.tpl.ts +124 -0
- package/src/templates/actions/create-pr.yml.tpl.ts +147 -0
- package/src/templates/actions/create-tag.yml.tpl.ts +112 -0
- package/src/templates/actions/detect-changes.yml.tpl.ts +87 -0
- package/src/templates/actions/manage-branch.yml.tpl.ts +132 -0
- package/src/templates/actions/promote-branch.yml.tpl.ts +364 -0
- package/src/templates/workflows/pipeline-path-based.yml.tpl.ts +706 -0
- package/src/types/index.ts +64 -0
- package/src/utils/README-ast-path-operations.md +390 -0
- package/src/utils/ast-path-operations.ts +581 -0
- package/src/utils/config.ts +64 -0
- package/src/utils/github-setup.ts +558 -0
- package/src/utils/idempotency.ts +215 -0
- package/src/utils/preflight.ts +306 -0
- package/src/utils/versioning.ts +244 -0
- package/tests/README.md +229 -0
- package/tests/TEST_STRUCTURE.md +256 -0
- package/tests/act/run-act-tests.sh +345 -0
- package/tests/debugging/debug-utils.ts +538 -0
- package/tests/debugging/debug-workflow.test.ts +339 -0
- package/tests/debugging/debug-workflows.sh +339 -0
- package/tests/debugging/iterative-debug.ts +652 -0
- package/tests/debugging/run-debug-tests.sh +431 -0
- package/tests/fixtures/basic-config.json +51 -0
- package/tests/fixtures/invalid-config.json +9 -0
- package/tests/fixtures/pipeline-generated.yml +235 -0
- package/tests/fixtures/pipeline-preserve-comments.yml +245 -0
- package/tests/fixtures/pipeline-user-modified.yml +245 -0
- package/tests/fixtures/test-config.json +58 -0
- package/tests/github-live/README.md +250 -0
- package/tests/github-local/JOB_WORKFLOW_TESTS.md +296 -0
- package/tests/github-local/README.md +240 -0
- package/tests/github-local/run-all-tests.sh +422 -0
- package/tests/github-local/test-job-workflows.sh +631 -0
- package/tests/github-local/test-pipeline-workflow.sh +440 -0
- package/tests/integration/generators.test.ts +578 -0
- package/tests/integration/path-based-template.test.ts +510 -0
- package/tests/integration/simple-path-based.test.ts +415 -0
- package/tests/setup.ts +56 -0
- package/tests/unit/ast-path-operations-extended.test.ts +302 -0
- package/tests/unit/cli.test.ts +541 -0
- package/tests/unit/config-extended.test.ts +412 -0
- package/tests/unit/config.test.ts +152 -0
- package/tests/unit/github-setup.test.ts +189 -0
- package/tests/unit/idempotency-isolated.test.ts +297 -0
- package/tests/unit/job-order.test.ts +157 -0
- package/tests/unit/pipeline-path-based.test.ts +511 -0
- package/tests/unit/validate-pipeline.test.ts +384 -0
- package/tests/unit/versioning-extended.test.ts +279 -0
- package/tests/unit/versioning.test.ts +241 -0
- package/tsconfig.debug.json +17 -0
- package/tsconfig.json +28 -0
- package/vitest.config.ts +51 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
## USER COMMENT 1
|
|
2
|
+
|
|
3
|
+
name: "USER NAME"
|
|
4
|
+
# USER COMMENT 2
|
|
5
|
+
on:
|
|
6
|
+
pull_request:
|
|
7
|
+
paths:
|
|
8
|
+
- '**/*.yml'
|
|
9
|
+
- '**/*.yaml'
|
|
10
|
+
- '**/*.json'
|
|
11
|
+
- '**/*.ts'
|
|
12
|
+
- '**/*.js'
|
|
13
|
+
- '**/*.tsx'
|
|
14
|
+
# USER COMMENT 3
|
|
15
|
+
branches:
|
|
16
|
+
- develop
|
|
17
|
+
- feature
|
|
18
|
+
- alpha
|
|
19
|
+
- beta
|
|
20
|
+
- gamma
|
|
21
|
+
- delta
|
|
22
|
+
- epsilon
|
|
23
|
+
# USER COMMENT 4
|
|
24
|
+
|
|
25
|
+
workflow_call:
|
|
26
|
+
inputs:
|
|
27
|
+
# USER COMMENT 5
|
|
28
|
+
fakevar1:
|
|
29
|
+
description: 'The fake version to deploy'
|
|
30
|
+
required: false
|
|
31
|
+
type: string
|
|
32
|
+
version:
|
|
33
|
+
description: The version to deploy
|
|
34
|
+
required: false
|
|
35
|
+
type: string
|
|
36
|
+
# USER COMMENT 7
|
|
37
|
+
fakevar2:
|
|
38
|
+
description: 'The fake version to deploy'
|
|
39
|
+
required: false
|
|
40
|
+
type: string
|
|
41
|
+
baseRef:
|
|
42
|
+
description: The base reference for comparison
|
|
43
|
+
required: false
|
|
44
|
+
type: string
|
|
45
|
+
# USER COMMENT 8
|
|
46
|
+
outputs:
|
|
47
|
+
fakevar3:
|
|
48
|
+
value: 'fakevalue3'
|
|
49
|
+
fakevar4:
|
|
50
|
+
value: 'fakevalue4'
|
|
51
|
+
workflow_dispatch:
|
|
52
|
+
inputs:
|
|
53
|
+
version:
|
|
54
|
+
description: The version to deploy
|
|
55
|
+
required: false
|
|
56
|
+
type: string
|
|
57
|
+
baseRef:
|
|
58
|
+
description: The base reference for comparison
|
|
59
|
+
required: false
|
|
60
|
+
type: string
|
|
61
|
+
|
|
62
|
+
jobs:
|
|
63
|
+
# USER COMMENT 9
|
|
64
|
+
|
|
65
|
+
fake-job-1:
|
|
66
|
+
# USER COMMENT 10
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
steps:
|
|
69
|
+
- name: Fake Job
|
|
70
|
+
run: |
|
|
71
|
+
echo "Running fake job"
|
|
72
|
+
|
|
73
|
+
# =============================================================================
|
|
74
|
+
# CHANGES DETECTION
|
|
75
|
+
# =============================================================================
|
|
76
|
+
# USER COMMENT 11
|
|
77
|
+
changes:
|
|
78
|
+
runs-on: ubuntu-latest
|
|
79
|
+
steps:
|
|
80
|
+
- uses: ./.github/actions/detect-changes
|
|
81
|
+
with:
|
|
82
|
+
baseRef: ${{ inputs.baseRef || 'epsilon' }}
|
|
83
|
+
|
|
84
|
+
# USER COMMENT 12
|
|
85
|
+
fake-job-2:
|
|
86
|
+
# USER COMMENT 13
|
|
87
|
+
runs-on: ubuntu-latest
|
|
88
|
+
steps:
|
|
89
|
+
- name: Fake Job
|
|
90
|
+
run: |
|
|
91
|
+
echo "Running fake job"
|
|
92
|
+
|
|
93
|
+
# =============================================================================
|
|
94
|
+
# TESTING JOBS
|
|
95
|
+
# =============================================================================
|
|
96
|
+
# Add your testing jobs here
|
|
97
|
+
# Example:
|
|
98
|
+
# test-api:
|
|
99
|
+
# needs: branch
|
|
100
|
+
# runs-on: ubuntu-latest
|
|
101
|
+
# steps:
|
|
102
|
+
# - name: Test API
|
|
103
|
+
# run: |
|
|
104
|
+
# echo "Run API tests"
|
|
105
|
+
#
|
|
106
|
+
# test-web:
|
|
107
|
+
# needs: branch
|
|
108
|
+
# runs-on: ubuntu-latest
|
|
109
|
+
# steps:
|
|
110
|
+
# - name: Test Web
|
|
111
|
+
# run: |
|
|
112
|
+
# echo "Run Web tests"
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# USER COMMENT 14
|
|
116
|
+
|
|
117
|
+
fake-job-3:
|
|
118
|
+
# USER COMMENT 15
|
|
119
|
+
runs-on: ubuntu-latest
|
|
120
|
+
steps:
|
|
121
|
+
- name: Fake Job
|
|
122
|
+
run: |
|
|
123
|
+
echo "Running fake job"
|
|
124
|
+
|
|
125
|
+
# =============================================================================
|
|
126
|
+
# VERSIONING
|
|
127
|
+
# =============================================================================
|
|
128
|
+
version:
|
|
129
|
+
if: github.ref_name == 'alpha'
|
|
130
|
+
needs: changes
|
|
131
|
+
runs-on: ubuntu-latest
|
|
132
|
+
steps:
|
|
133
|
+
- uses: ./.github/actions/calculate-version
|
|
134
|
+
with:
|
|
135
|
+
baseRef: ${{ inputs.baseRef || 'epsilon' }}
|
|
136
|
+
|
|
137
|
+
# USER COMMENT 16
|
|
138
|
+
|
|
139
|
+
fake-job-4:
|
|
140
|
+
# USER COMMENT 17
|
|
141
|
+
runs-on: ubuntu-latest
|
|
142
|
+
steps:
|
|
143
|
+
- name: Fake Job
|
|
144
|
+
run: |
|
|
145
|
+
echo "Running fake job"
|
|
146
|
+
|
|
147
|
+
# USER COMMENT 18
|
|
148
|
+
|
|
149
|
+
fake-job-5:
|
|
150
|
+
# USER COMMENT 19
|
|
151
|
+
runs-on: ubuntu-latest
|
|
152
|
+
steps:
|
|
153
|
+
- name: Fake Job
|
|
154
|
+
run: |
|
|
155
|
+
echo "Running fake job"
|
|
156
|
+
|
|
157
|
+
# USER COMMENT 20
|
|
158
|
+
|
|
159
|
+
# =============================================================================
|
|
160
|
+
# DEPLOYMENT JOBS
|
|
161
|
+
# =============================================================================
|
|
162
|
+
deploy-api:
|
|
163
|
+
needs: branch
|
|
164
|
+
runs-on: ubuntu-latest
|
|
165
|
+
steps:
|
|
166
|
+
- name: Deploy API
|
|
167
|
+
run: |
|
|
168
|
+
echo "Deploy API to production"
|
|
169
|
+
|
|
170
|
+
fake-job-6:
|
|
171
|
+
# USER COMMENT 21
|
|
172
|
+
runs-on: ubuntu-latest
|
|
173
|
+
steps:
|
|
174
|
+
- name: Fake Job
|
|
175
|
+
run: |
|
|
176
|
+
echo "Running fake job"
|
|
177
|
+
|
|
178
|
+
# =============================================================================
|
|
179
|
+
# TAG & CREATE PR
|
|
180
|
+
# =============================================================================
|
|
181
|
+
tag:
|
|
182
|
+
if: github.ref_name == 'alpha'
|
|
183
|
+
needs: version
|
|
184
|
+
runs-on: ubuntu-latest
|
|
185
|
+
steps:
|
|
186
|
+
- uses: ./.github/actions/create-tag
|
|
187
|
+
with:
|
|
188
|
+
version: ${{ needs.version.outputs.nextVersion }}
|
|
189
|
+
|
|
190
|
+
# USER COMMENT 22
|
|
191
|
+
|
|
192
|
+
fake-job-7:
|
|
193
|
+
# USER COMMENT 23
|
|
194
|
+
runs-on: ubuntu-latest
|
|
195
|
+
steps:
|
|
196
|
+
- name: Fake Job
|
|
197
|
+
run: |
|
|
198
|
+
echo "Running fake job"
|
|
199
|
+
|
|
200
|
+
createpr:
|
|
201
|
+
## SHOULD BE ANY BRANCH EXCEPT the final branch
|
|
202
|
+
if: github.ref_name != 'epsilon'
|
|
203
|
+
needs: tag
|
|
204
|
+
runs-on: ubuntu-latest
|
|
205
|
+
steps:
|
|
206
|
+
- uses: ./.github/actions/create-pr
|
|
207
|
+
with:
|
|
208
|
+
sourceBranch: ${{ github.ref_name }}
|
|
209
|
+
targetBranch: ${{ github.ref_name == 'alpha' && 'beta' || github.ref_name ==
|
|
210
|
+
'beta' && 'gamma' || 'epsilon' }}
|
|
211
|
+
title: 'Release ${{ needs.version.outputs.nextVersion }}'
|
|
212
|
+
body: 'Automated release PR for version ${{ needs.version.outputs.nextVersion
|
|
213
|
+
}}'
|
|
214
|
+
|
|
215
|
+
branch:
|
|
216
|
+
## SHOULD BE THE NEXT BRANCH
|
|
217
|
+
needs: createpr
|
|
218
|
+
runs-on: ubuntu-latest
|
|
219
|
+
steps:
|
|
220
|
+
- uses: ./.github/actions/manage-branch
|
|
221
|
+
with:
|
|
222
|
+
action: 'fast-forward'
|
|
223
|
+
targetBranch: ${{ github.ref_name == 'alpha' && 'beta' || github.ref_name ==
|
|
224
|
+
'beta' && 'gamma' || 'epsilon' }}
|
|
225
|
+
sourceBranch: ${{ github.ref_name }}
|
|
226
|
+
|
|
227
|
+
# USER COMMENT 24
|
|
228
|
+
|
|
229
|
+
fake-job-8:
|
|
230
|
+
# USER COMMENT 25
|
|
231
|
+
runs-on: ubuntu-latest
|
|
232
|
+
steps:
|
|
233
|
+
- name: Fake Job
|
|
234
|
+
run: |
|
|
235
|
+
echo "Running fake job"
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
## USER COMMENT 1
|
|
2
|
+
|
|
3
|
+
name: "USER NAME"
|
|
4
|
+
# USER COMMENT 2
|
|
5
|
+
on:
|
|
6
|
+
pull_request:
|
|
7
|
+
paths:
|
|
8
|
+
- '**/*.yml'
|
|
9
|
+
- '**/*.yaml'
|
|
10
|
+
- '**/*.json'
|
|
11
|
+
- '**/*.ts'
|
|
12
|
+
- '**/*.js'
|
|
13
|
+
- '**/*.tsx'
|
|
14
|
+
# USER COMMENT 3
|
|
15
|
+
branches:
|
|
16
|
+
- develop
|
|
17
|
+
- feature
|
|
18
|
+
- alpha
|
|
19
|
+
- beta
|
|
20
|
+
- gamma
|
|
21
|
+
- delta
|
|
22
|
+
- epsilon
|
|
23
|
+
# USER COMMENT 4
|
|
24
|
+
|
|
25
|
+
workflow_call:
|
|
26
|
+
inputs:
|
|
27
|
+
# USER COMMENT 5
|
|
28
|
+
fakevar1:
|
|
29
|
+
description: 'The fake version to deploy'
|
|
30
|
+
required: false
|
|
31
|
+
type: string
|
|
32
|
+
version:
|
|
33
|
+
description: The version to deploy
|
|
34
|
+
required: false
|
|
35
|
+
type: string
|
|
36
|
+
# USER COMMENT 7
|
|
37
|
+
fakevar2:
|
|
38
|
+
description: 'The fake version to deploy'
|
|
39
|
+
required: false
|
|
40
|
+
type: string
|
|
41
|
+
baseRef:
|
|
42
|
+
description: The base reference for comparison
|
|
43
|
+
required: false
|
|
44
|
+
type: string
|
|
45
|
+
# USER COMMENT 8
|
|
46
|
+
outputs:
|
|
47
|
+
fakevar3:
|
|
48
|
+
value: 'fakevalue3'
|
|
49
|
+
fakevar4:
|
|
50
|
+
value: 'fakevalue4'
|
|
51
|
+
workflow_dispatch:
|
|
52
|
+
inputs:
|
|
53
|
+
version:
|
|
54
|
+
description: The version to deploy
|
|
55
|
+
required: false
|
|
56
|
+
type: string
|
|
57
|
+
baseRef:
|
|
58
|
+
description: The base reference for comparison
|
|
59
|
+
required: false
|
|
60
|
+
type: string
|
|
61
|
+
|
|
62
|
+
jobs:
|
|
63
|
+
# USER COMMENT 9
|
|
64
|
+
|
|
65
|
+
fake-job-1:
|
|
66
|
+
# USER COMMENT 10
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
steps:
|
|
69
|
+
- name: Fake Job
|
|
70
|
+
run: |
|
|
71
|
+
echo "Running fake job"
|
|
72
|
+
|
|
73
|
+
# =============================================================================
|
|
74
|
+
# CHANGES DETECTION
|
|
75
|
+
# =============================================================================
|
|
76
|
+
# USER COMMENT 11
|
|
77
|
+
changes:
|
|
78
|
+
runs-on: ubuntu-latest
|
|
79
|
+
steps:
|
|
80
|
+
- uses: ./.github/actions/detect-changes
|
|
81
|
+
with:
|
|
82
|
+
baseRef: ${{ inputs.baseRef || 'epsilon' }}
|
|
83
|
+
|
|
84
|
+
# USER COMMENT 12
|
|
85
|
+
fake-job-2:
|
|
86
|
+
# USER COMMENT 13
|
|
87
|
+
runs-on: ubuntu-latest
|
|
88
|
+
steps:
|
|
89
|
+
- name: Fake Job
|
|
90
|
+
run: |
|
|
91
|
+
echo "Running fake job"
|
|
92
|
+
|
|
93
|
+
# =============================================================================
|
|
94
|
+
# TESTING JOBS
|
|
95
|
+
# =============================================================================
|
|
96
|
+
# Add your testing jobs here
|
|
97
|
+
# Example:
|
|
98
|
+
# test-api:
|
|
99
|
+
# needs: branch
|
|
100
|
+
# runs-on: ubuntu-latest
|
|
101
|
+
# steps:
|
|
102
|
+
# - name: Test API
|
|
103
|
+
# run: |
|
|
104
|
+
# echo "Run API tests"
|
|
105
|
+
#
|
|
106
|
+
# test-web:
|
|
107
|
+
# needs: branch
|
|
108
|
+
# runs-on: ubuntu-latest
|
|
109
|
+
# steps:
|
|
110
|
+
# - name: Test Web
|
|
111
|
+
# run: |
|
|
112
|
+
# echo "Run Web tests"
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# USER COMMENT 14
|
|
116
|
+
|
|
117
|
+
fake-job-3:
|
|
118
|
+
# USER COMMENT 15
|
|
119
|
+
runs-on: ubuntu-latest
|
|
120
|
+
steps:
|
|
121
|
+
- name: Fake Job
|
|
122
|
+
run: |
|
|
123
|
+
echo "Running fake job"
|
|
124
|
+
|
|
125
|
+
# =============================================================================
|
|
126
|
+
# VERSIONING
|
|
127
|
+
# =============================================================================
|
|
128
|
+
version:
|
|
129
|
+
# =============================================================================
|
|
130
|
+
# VERSIONING
|
|
131
|
+
# =============================================================================
|
|
132
|
+
if: github.ref_name == 'alpha'
|
|
133
|
+
needs: changes
|
|
134
|
+
runs-on: ubuntu-latest
|
|
135
|
+
steps:
|
|
136
|
+
- uses: ./.github/actions/calculate-version
|
|
137
|
+
with:
|
|
138
|
+
baseRef: ${{ inputs.baseRef || 'epsilon' }}
|
|
139
|
+
|
|
140
|
+
# USER COMMENT 16
|
|
141
|
+
|
|
142
|
+
fake-job-4:
|
|
143
|
+
# USER COMMENT 17
|
|
144
|
+
runs-on: ubuntu-latest
|
|
145
|
+
steps:
|
|
146
|
+
- name: Fake Job
|
|
147
|
+
run: |
|
|
148
|
+
echo "Running fake job"
|
|
149
|
+
|
|
150
|
+
# USER COMMENT 18
|
|
151
|
+
|
|
152
|
+
fake-job-5:
|
|
153
|
+
# USER COMMENT 19
|
|
154
|
+
runs-on: ubuntu-latest
|
|
155
|
+
steps:
|
|
156
|
+
- name: Fake Job
|
|
157
|
+
run: |
|
|
158
|
+
echo "Running fake job"
|
|
159
|
+
|
|
160
|
+
# USER COMMENT 20
|
|
161
|
+
|
|
162
|
+
# =============================================================================
|
|
163
|
+
# DEPLOYMENT JOBS
|
|
164
|
+
# =============================================================================
|
|
165
|
+
deploy-api:
|
|
166
|
+
needs: branch
|
|
167
|
+
runs-on: ubuntu-latest
|
|
168
|
+
steps:
|
|
169
|
+
- name: Deploy API
|
|
170
|
+
run: |
|
|
171
|
+
echo "Deploy API to production"
|
|
172
|
+
|
|
173
|
+
fake-job-6:
|
|
174
|
+
# USER COMMENT 21
|
|
175
|
+
runs-on: ubuntu-latest
|
|
176
|
+
steps:
|
|
177
|
+
- name: Fake Job
|
|
178
|
+
run: |
|
|
179
|
+
echo "Running fake job"
|
|
180
|
+
|
|
181
|
+
# =============================================================================
|
|
182
|
+
# TAG & CREATE PR
|
|
183
|
+
# =============================================================================
|
|
184
|
+
tag:
|
|
185
|
+
# =============================================================================
|
|
186
|
+
# TAG & CREATE PR
|
|
187
|
+
# =============================================================================
|
|
188
|
+
if: github.ref_name == 'alpha'
|
|
189
|
+
needs: version
|
|
190
|
+
runs-on: ubuntu-latest
|
|
191
|
+
steps:
|
|
192
|
+
- uses: ./.github/actions/create-tag
|
|
193
|
+
with:
|
|
194
|
+
version: ${{ needs.version.outputs.nextVersion }}
|
|
195
|
+
|
|
196
|
+
# USER COMMENT 22
|
|
197
|
+
|
|
198
|
+
fake-job-7:
|
|
199
|
+
# USER COMMENT 23
|
|
200
|
+
runs-on: ubuntu-latest
|
|
201
|
+
steps:
|
|
202
|
+
- name: Fake Job
|
|
203
|
+
run: |
|
|
204
|
+
echo "Running fake job"
|
|
205
|
+
|
|
206
|
+
createpr:
|
|
207
|
+
## SHOULD BE ANY BRANCH EXCEPT the final branch
|
|
208
|
+
if: github.ref_name != 'epsilon'
|
|
209
|
+
needs: tag
|
|
210
|
+
runs-on: ubuntu-latest
|
|
211
|
+
steps:
|
|
212
|
+
- uses: ./.github/actions/create-pr
|
|
213
|
+
with:
|
|
214
|
+
sourceBranch: ${{ github.ref_name }}
|
|
215
|
+
targetBranch: ${{ github.ref_name == 'alpha' && 'beta' || github.ref_name ==
|
|
216
|
+
'beta' && 'gamma' || github.ref_name == 'gamma' && 'delta' ||
|
|
217
|
+
github.ref_name == 'delta' && 'epsilon' || github.ref_name ==
|
|
218
|
+
'epsilon' && 'epsilon' || 'epsilon' }}
|
|
219
|
+
title: 'Release ${{ needs.version.outputs.nextVersion }}'
|
|
220
|
+
body: 'Automated release PR for version ${{ needs.version.outputs.nextVersion
|
|
221
|
+
}}'
|
|
222
|
+
|
|
223
|
+
branch:
|
|
224
|
+
## SHOULD BE THE NEXT BRANCH
|
|
225
|
+
needs: createpr
|
|
226
|
+
runs-on: ubuntu-latest
|
|
227
|
+
steps:
|
|
228
|
+
- uses: ./.github/actions/manage-branch
|
|
229
|
+
with:
|
|
230
|
+
action: 'fast-forward'
|
|
231
|
+
targetBranch: ${{ github.ref_name == 'alpha' && 'beta' || github.ref_name ==
|
|
232
|
+
'beta' && 'gamma' || github.ref_name == 'gamma' && 'delta' ||
|
|
233
|
+
github.ref_name == 'delta' && 'epsilon' || github.ref_name ==
|
|
234
|
+
'epsilon' && 'epsilon' || 'epsilon' }}
|
|
235
|
+
sourceBranch: ${{ github.ref_name }}
|
|
236
|
+
|
|
237
|
+
# USER COMMENT 24
|
|
238
|
+
|
|
239
|
+
fake-job-8:
|
|
240
|
+
# USER COMMENT 25
|
|
241
|
+
runs-on: ubuntu-latest
|
|
242
|
+
steps:
|
|
243
|
+
- name: Fake Job
|
|
244
|
+
run: |
|
|
245
|
+
echo "Running fake job"
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
## USER COMMENT 1
|
|
2
|
+
|
|
3
|
+
name: "USER NAME"
|
|
4
|
+
# USER COMMENT 2
|
|
5
|
+
on:
|
|
6
|
+
pull_request:
|
|
7
|
+
paths:
|
|
8
|
+
- '**/*.yml'
|
|
9
|
+
- '**/*.yaml'
|
|
10
|
+
- '**/*.json'
|
|
11
|
+
- '**/*.ts'
|
|
12
|
+
- '**/*.js'
|
|
13
|
+
- '**/*.tsx'
|
|
14
|
+
# USER COMMENT 3
|
|
15
|
+
branches:
|
|
16
|
+
- develop
|
|
17
|
+
- feature
|
|
18
|
+
- alpha
|
|
19
|
+
- beta
|
|
20
|
+
- gamma
|
|
21
|
+
- delta
|
|
22
|
+
- epsilon
|
|
23
|
+
# USER COMMENT 4
|
|
24
|
+
|
|
25
|
+
workflow_call:
|
|
26
|
+
inputs:
|
|
27
|
+
# USER COMMENT 5
|
|
28
|
+
fakevar1:
|
|
29
|
+
description: 'The fake version to deploy'
|
|
30
|
+
required: false
|
|
31
|
+
type: string
|
|
32
|
+
version:
|
|
33
|
+
description: The version to deploy
|
|
34
|
+
required: false
|
|
35
|
+
type: string
|
|
36
|
+
# USER COMMENT 7
|
|
37
|
+
fakevar2:
|
|
38
|
+
description: 'The fake version to deploy'
|
|
39
|
+
required: false
|
|
40
|
+
type: string
|
|
41
|
+
baseRef:
|
|
42
|
+
description: The base reference for comparison
|
|
43
|
+
required: false
|
|
44
|
+
type: string
|
|
45
|
+
# USER COMMENT 8
|
|
46
|
+
outputs:
|
|
47
|
+
fakevar3:
|
|
48
|
+
value: 'fakevalue3'
|
|
49
|
+
fakevar4:
|
|
50
|
+
value: 'fakevalue4'
|
|
51
|
+
workflow_dispatch:
|
|
52
|
+
inputs:
|
|
53
|
+
version:
|
|
54
|
+
description: The version to deploy
|
|
55
|
+
required: false
|
|
56
|
+
type: string
|
|
57
|
+
baseRef:
|
|
58
|
+
description: The base reference for comparison
|
|
59
|
+
required: false
|
|
60
|
+
type: string
|
|
61
|
+
|
|
62
|
+
jobs:
|
|
63
|
+
# USER COMMENT 9
|
|
64
|
+
|
|
65
|
+
fake-job-1:
|
|
66
|
+
# USER COMMENT 10
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
steps:
|
|
69
|
+
- name: Fake Job
|
|
70
|
+
run: |
|
|
71
|
+
echo "Running fake job"
|
|
72
|
+
|
|
73
|
+
# =============================================================================
|
|
74
|
+
# CHANGES DETECTION
|
|
75
|
+
# =============================================================================
|
|
76
|
+
# USER COMMENT 11
|
|
77
|
+
changes:
|
|
78
|
+
runs-on: ubuntu-latest
|
|
79
|
+
steps:
|
|
80
|
+
- uses: ./.github/actions/detect-changes
|
|
81
|
+
with:
|
|
82
|
+
baseRef: ${{ inputs.baseRef || epsilon }}
|
|
83
|
+
|
|
84
|
+
# USER COMMENT 12
|
|
85
|
+
fake-job-2:
|
|
86
|
+
# USER COMMENT 13
|
|
87
|
+
runs-on: ubuntu-latest
|
|
88
|
+
steps:
|
|
89
|
+
- name: Fake Job
|
|
90
|
+
run: |
|
|
91
|
+
echo "Running fake job"
|
|
92
|
+
|
|
93
|
+
# =============================================================================
|
|
94
|
+
# TESTING JOBS
|
|
95
|
+
# =============================================================================
|
|
96
|
+
# Add your testing jobs here
|
|
97
|
+
# Example:
|
|
98
|
+
# test-api:
|
|
99
|
+
# needs: branch
|
|
100
|
+
# runs-on: ubuntu-latest
|
|
101
|
+
# steps:
|
|
102
|
+
# - name: Test API
|
|
103
|
+
# run: |
|
|
104
|
+
# echo "Run API tests"
|
|
105
|
+
#
|
|
106
|
+
# test-web:
|
|
107
|
+
# needs: branch
|
|
108
|
+
# runs-on: ubuntu-latest
|
|
109
|
+
# steps:
|
|
110
|
+
# - name: Test Web
|
|
111
|
+
# run: |
|
|
112
|
+
# echo "Run Web tests"
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# USER COMMENT 14
|
|
116
|
+
|
|
117
|
+
fake-job-3:
|
|
118
|
+
# USER COMMENT 15
|
|
119
|
+
runs-on: ubuntu-latest
|
|
120
|
+
steps:
|
|
121
|
+
- name: Fake Job
|
|
122
|
+
run: |
|
|
123
|
+
echo "Running fake job"
|
|
124
|
+
|
|
125
|
+
# =============================================================================
|
|
126
|
+
# VERSIONING
|
|
127
|
+
# =============================================================================
|
|
128
|
+
version:
|
|
129
|
+
# =============================================================================
|
|
130
|
+
# VERSIONING
|
|
131
|
+
# =============================================================================
|
|
132
|
+
if: github.ref_name == 'alpha'
|
|
133
|
+
needs: changes
|
|
134
|
+
runs-on: ubuntu-latest
|
|
135
|
+
steps:
|
|
136
|
+
- uses: ./.github/actions/calculate-version
|
|
137
|
+
with:
|
|
138
|
+
baseRef: ${{ inputs.baseRef || 'epsilon' }}
|
|
139
|
+
|
|
140
|
+
# USER COMMENT 16
|
|
141
|
+
|
|
142
|
+
fake-job-4:
|
|
143
|
+
# USER COMMENT 17
|
|
144
|
+
runs-on: ubuntu-latest
|
|
145
|
+
steps:
|
|
146
|
+
- name: Fake Job
|
|
147
|
+
run: |
|
|
148
|
+
echo "Running fake job"
|
|
149
|
+
|
|
150
|
+
# USER COMMENT 18
|
|
151
|
+
|
|
152
|
+
fake-job-5:
|
|
153
|
+
# USER COMMENT 19
|
|
154
|
+
runs-on: ubuntu-latest
|
|
155
|
+
steps:
|
|
156
|
+
- name: Fake Job
|
|
157
|
+
run: |
|
|
158
|
+
echo "Running fake job"
|
|
159
|
+
|
|
160
|
+
# USER COMMENT 20
|
|
161
|
+
|
|
162
|
+
# =============================================================================
|
|
163
|
+
# DEPLOYMENT JOBS
|
|
164
|
+
# =============================================================================
|
|
165
|
+
deploy-api:
|
|
166
|
+
needs: branch
|
|
167
|
+
runs-on: ubuntu-latest
|
|
168
|
+
steps:
|
|
169
|
+
- name: Deploy API
|
|
170
|
+
run: |
|
|
171
|
+
echo "Deploy API to production"
|
|
172
|
+
|
|
173
|
+
fake-job-6:
|
|
174
|
+
# USER COMMENT 21
|
|
175
|
+
runs-on: ubuntu-latest
|
|
176
|
+
steps:
|
|
177
|
+
- name: Fake Job
|
|
178
|
+
run: |
|
|
179
|
+
echo "Running fake job"
|
|
180
|
+
|
|
181
|
+
# =============================================================================
|
|
182
|
+
# TAG & CREATE PR
|
|
183
|
+
# =============================================================================
|
|
184
|
+
tag:
|
|
185
|
+
# =============================================================================
|
|
186
|
+
# TAG & CREATE PR
|
|
187
|
+
# =============================================================================
|
|
188
|
+
if: github.ref_name == 'alpha'
|
|
189
|
+
needs: version
|
|
190
|
+
runs-on: ubuntu-latest
|
|
191
|
+
steps:
|
|
192
|
+
- uses: ./.github/actions/create-tag
|
|
193
|
+
with:
|
|
194
|
+
version: ${{ needs.version.outputs.nextVersion }}
|
|
195
|
+
|
|
196
|
+
# USER COMMENT 22
|
|
197
|
+
|
|
198
|
+
fake-job-7:
|
|
199
|
+
# USER COMMENT 23
|
|
200
|
+
runs-on: ubuntu-latest
|
|
201
|
+
steps:
|
|
202
|
+
- name: Fake Job
|
|
203
|
+
run: |
|
|
204
|
+
echo "Running fake job"
|
|
205
|
+
|
|
206
|
+
createpr:
|
|
207
|
+
## SHOULD BE ANY BRANCH EXCEPT the final branch
|
|
208
|
+
if: github.ref_name != 'epsilon'
|
|
209
|
+
needs: tag
|
|
210
|
+
runs-on: ubuntu-latest
|
|
211
|
+
steps:
|
|
212
|
+
- uses: ./.github/actions/create-pr
|
|
213
|
+
with:
|
|
214
|
+
sourceBranch: ${{ github.ref_name }}
|
|
215
|
+
targetBranch: ${{ github.ref_name == 'alpha' && 'beta' || github.ref_name ==
|
|
216
|
+
'beta' && 'gamma' || github.ref_name == 'gamma' && 'delta' ||
|
|
217
|
+
github.ref_name == 'delta' && 'epsilon' || github.ref_name ==
|
|
218
|
+
'epsilon' && 'epsilon' || 'epsilon' }}
|
|
219
|
+
title: 'Release ${{ needs.version.outputs.nextVersion }}'
|
|
220
|
+
body: 'Automated release PR for version ${{ needs.version.outputs.nextVersion
|
|
221
|
+
}}'
|
|
222
|
+
|
|
223
|
+
branch:
|
|
224
|
+
## SHOULD BE THE NEXT BRANCH
|
|
225
|
+
needs: createpr
|
|
226
|
+
runs-on: ubuntu-latest
|
|
227
|
+
steps:
|
|
228
|
+
- uses: ./.github/actions/manage-branch
|
|
229
|
+
with:
|
|
230
|
+
action: 'fast-forward'
|
|
231
|
+
targetBranch: ${{ github.ref_name == 'alpha' && 'beta' || github.ref_name ==
|
|
232
|
+
'beta' && 'gamma' || github.ref_name == 'gamma' && 'delta' ||
|
|
233
|
+
github.ref_name == 'delta' && 'epsilon' || github.ref_name ==
|
|
234
|
+
'epsilon' && 'epsilon' || 'epsilon' }}
|
|
235
|
+
sourceBranch: ${{ github.ref_name }}
|
|
236
|
+
|
|
237
|
+
# USER COMMENT 24
|
|
238
|
+
|
|
239
|
+
fake-job-8:
|
|
240
|
+
# USER COMMENT 25
|
|
241
|
+
runs-on: ubuntu-latest
|
|
242
|
+
steps:
|
|
243
|
+
- name: Fake Job
|
|
244
|
+
run: |
|
|
245
|
+
echo "Running fake job"
|