Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
git-commit git-commit
Commit and push changes to repository
arguments
commit_and_push:
title: Commit changes and push
type: git-commit
arguments:
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
git: github
working_directory: '/codefresh/volume/${{CF_REPO_NAME}}'
commit_message: Some commit message
git_user_name: git-user-name
git_user_email: git-user@email.com
allow_empty: false
rebase: true
base_branch: feature
add:
- file1.txt
- file2.txt
- ./dir3
gpg_signed_commit:
title: Sign commit with GPG and push
type: git-commit
arguments:
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
git: github
working_directory: '/codefresh/volume/${{CF_REPO_NAME}}'
commit_message: Some commit message
git_user_name: git-user-name
git_user_email: git-user@email.com
allow_empty: false
gpg_key_id: '${{GPG_KEY_ID}}'
gpg_secret_key: '${{GPG_SECRET_KEY}}'
add:
- file1.txt
- file2.txt
- ./dir3