Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GitHub action with ability to run codefresh pipeline

License

NotificationsYou must be signed in to change notification settings

codefresh-io/codefresh-pipeline-runner

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#commit 1

Github actions are a flexible way to respond to Github events and perform one or more taskswhen a specific Github event happens. Github actions can also use Codefresh pipeline as a back-endresulting in a very powerful combination where the first action starts from Github, but Codefresh takes careof the actual compilation or deployment in a pipeline.

Codefresh Github action

This repository holds a Github action that can be used to call existingCodefresh pipelines. It is based on theCodefresh CLI which can execute Codefresh pipelines remotely (using an API key for authentication). The Codefresh CLI is already available as apublic Docker image, so creating a Github action with it is a trivial process.

Prerequisites

Make sure that you have

How the Codefresh action works

The Github workflow is placed on thepush event and therefore starts whenever a Git commit happens. The Workflow has a single action that starts the Codefresh pipeline runner.

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.

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

How to use the Codefresh Github action

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)

Select the pipeline runner action and click the "Edit" button. On the right side panel enter the following

  • A secret with nameCF_API_KEY and value your Codefresh API token
  • An environment variable calledPIPELINE_NAME with a value of<project_name>/<pipeline_name>
  • An optional environment variable calledTRIGGER_NAME with trigger name attached to this pipeline. See thetriggers section for more information

Click the Done button to save your changes and commit.

Now next time you commit anything in your Github repository the Codefresh pipeline will also execute.

Usage

An example to run codefresh pipeline that can compile, test , docker build and deploy to kubernetes

name: 'Codefresh pipeline runner'description: 'Github action that run codefresh pipeline'author: 'codefresh'branding:  icon: 'arrow-right-circle'  color: 'green'runs:  using: 'docker'  image: 'Dockerfile'

About

GitHub action with ability to run codefresh pipeline

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors8


[8]ページ先頭

©2009-2025 Movatter.jp