You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,34 +1,34 @@
1
1
# Codefresh pipeline runner
2
2
3
-
This repository holds a Github action that can be used to call existing [Codefresh pipelines](https://codefresh.io/docs/docs/configure-ci-cd-pipeline/pipelines/). It is based on the [Codefresh CLI](https://codefresh-io.github.io/cli/) which can execute Codefresh pipelines remotely (using an API key for authentication). The Codefresh CLI is already available as a [public Docker image](https://hub.docker.com/r/codefresh/cli/), so creating a Github action with it is a trivial process.
3
+
This repository holds a GitHub action that can be used to call existing [Codefresh pipelines](https://codefresh.io/docs/docs/configure-ci-cd-pipeline/pipelines/). It is based on the [Codefresh CLI](https://codefresh-io.github.io/cli/) which can execute Codefresh pipelines remotely (using an API key for authentication). The Codefresh CLI is already available as a [public Docker image](https://hub.docker.com/r/codefresh/cli/), so creating a GitHub action with it is a trivial process.
4
4
5
5
# Integrating Codefresh pipelines with GitHub actions
6
6
7
7
GitHub actions are a flexible way to respond to GitHub events and perform one or more tasks
8
-
when a specific GitHub event happens. Github actions can also use Codefresh pipeline as a back-end
8
+
when a specific GitHub event happens. GitHub actions can also use Codefresh pipeline as a back-end
9
9
resulting in a very powerful combination where the first action starts from GitHub, but Codefresh takes care
10
10
of the actual compilation or deployment in a pipeline.
11
11
12
12
## Prerequisites
13
13
14
14
Make sure that you have
15
15
16
-
* a Github account with Actions enabled
16
+
* a GitHub account with Actions enabled
17
17
* a [Codefresh account](https://codefresh.io/docs/docs/getting-started/create-a-codefresh-account/) with one or more existing pipelines ready
18
-
* a [Codefresh API token](https://codefresh.io/docs/docs/integrations/codefresh-api/#authentication-instructions) that will be used as a secret in the Github action
18
+
* a [Codefresh API token](https://codefresh.io/docs/docs/integrations/codefresh-api/#authentication-instructions) that will be used as a secret in the GitHub action
19
19
20
20
21
21
## How the Codefresh action works
22
22
23
-
The Github workflow is placed on the [push event](https://developer.github.com/v3/activity/events/types/#pushevent) and therefore starts whenever a Git commit happens. The Workflow has a single action that starts the Codefresh pipeline runner.
23
+
The GitHub workflow is placed on the [push event](https://developer.github.com/v3/activity/events/types/#pushevent) and therefore starts whenever a Git commit happens. The Workflow has a single action that starts the Codefresh pipeline runner.
24
24
25
25
The pipeline runner is a Docker image with the Codefresh CLI. It uses the Codefresh API token to authenticate to Codefresh and then calls a an existing pipeline via its trigger.
26
26
27
27
The result is that all the details from the Git push (i.e. the GIT hash) are transferred to the Codefresh pipeline that gets triggered remotely
28
28
29
-
## How to use the Codefresh Github action
29
+
## How to use the Codefresh GitHub action
30
30
31
-
In order to use the Github action, fork this repository and then navigate to the "Actions" tab in Github. Click on the "View main.workflow" button on the right hand side. Make sure that an actual branch is selected on the top left of the window. Then click the "Edit this file" button in the main workarea (exactly as you would edit a normal git file via Github)
31
+
In order to use the GitHub action, fork this repository and then navigate to the "Actions" tab in GitHub. Click on the "View main.workflow" button on the right hand side. Make sure that an actual branch is selected on the top left of the window. Then click the "Edit this file" button in the main workarea (exactly as you would edit a normal git file via GitHub)
32
32
33
33
Select the pipeline runner action and click the "Edit" button. On the right side panel enter the following
34
34
@@ -38,14 +38,14 @@ Select the pipeline runner action and click the "Edit" button. On the right side
38
38
39
39
Click the Done button to save your changes and commit.
40
40
41
-
Now next time you commit anything in your Github repository the Codefresh pipeline will also execute.
41
+
Now next time you commit anything in your GitHub repository the Codefresh pipeline will also execute.
42
42
43
43
## Usage
44
44
45
45
An example to run codefresh pipeline that can compile, test , docker build and deploy to kubernetes
46
46
```
47
47
name: 'Codefresh pipeline runner'
48
-
description: 'Github action that run codefresh pipeline'
48
+
description: 'GitHub action that run codefresh pipeline'
0 commit comments