File tree Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ ## What
2
+
3
+ ## Why
4
+
5
+ ## Notes
Original file line number Diff line number Diff line change
1
+ name : Steps Test
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - master
7
+
8
+ env :
9
+ PIPELINE_NAME : " cli-v1-e2e/codefresh-run-step-e2e"
10
+ TRIGGER_NAME : " codefresh_run_step_dev"
11
+
12
+ jobs :
13
+ codefresh_run_test :
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - id : clone
17
+ uses : actions/checkout@v4
18
+ with :
19
+ repository : ${{ github.repository }}
20
+ ref : ${{ github.ref }}
21
+ fetch-depth : 0
22
+
23
+ - id : base-sha
24
+ run : |
25
+ echo "result=$(git rev-parse --short origin/master)" >> $GITHUB_OUTPUT
26
+
27
+ - id : git-branch-name
28
+ uses : ohueter/normalize-git-branch-name@v1
29
+ with :
30
+ ref : ${{ github.ref }}
31
+ head-ref : ${{ github.head_ref }}
32
+
33
+ - id : changed-files
34
+ uses : tj-actions/changed-files@v39
35
+ with :
36
+ base_sha : ${{ steps.base-sha.outputs.result }}
37
+ json : true
38
+ escape_json : false
39
+ files : |
40
+ graduated/codefresh-run/**
41
+
42
+ - id : setup-node
43
+ if : steps.changed-files.outputs.any_changed == 'true'
44
+ uses : actions/setup-node@v3
45
+ with :
46
+ node-version : 18
47
+
48
+ - id : codefresh-run
49
+ if : steps.changed-files.outputs.any_changed == 'true'
50
+ run : |
51
+ npm install -g codefresh
52
+ codefresh auth create-context --api-key ${{ secrets.CF_API_KEY }}
53
+ codefresh run ${{ env.PIPELINE_NAME }} -t ${{ env.TRIGGER_NAME }} -b ${{ steps.git-branch-name.outputs.original_name }}
You can’t perform that action at this time.
0 commit comments