你应该在任务中进行提交。
您可以通过制作一个以回购作为输入的任务,并将修改后的回购作为输出进行声明。从输入到输出克隆后,切换到输出文件夹,进行更改并提交。
下面是一个例子pipeline.yml
:
resources:
- name: some-repo
type: git
source:
uri: [email protected]:myorg/project
jobs:
- name: commit-and-push
plan:
- get: some-repo
- task: commit
config:
platform: linux
image_resource:
type: docker-image
source:
repository: concourse/buildroot
tag: git
inputs:
- name: some-repo
outputs:
- name: some-modified-repo
run:
path: /bin/bash
args:
- -c
- |
set -eux
git clone some-repo some-modified-repo
cd some-modified-repo
echo "new line" >> some-file.txt
git add .
git config --global user.name "YOUR NAME"
git config --global user.email "YOUR EMAIL ADDRESS"
git commit -m "Changed some-file.txt"
- put: some-repo
params: {repository: some-modified-repo}
你应该看看[Maven的版本插件(http://maven.apache.org/maven-release/maven-release-plugin/) – Mureinik