Skip to content

Commit e755cad

Browse files
add codefresh-run-e2e action (#649)
1 parent 822afc0 commit e755cad

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

.github/pull_request_template.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## What
2+
3+
## Why
4+
5+
## Notes
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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 }}

0 commit comments

Comments
 (0)