Dagweave catalog

Commit and push a working directory

git-commit-pushv1.0.2updated 2026-10-193 versions

Commit the changes in a checked-out working directory and push HEAD to a branch on its remote. Author identity and target branch are configurable; credentials come from a Kubernetes Secret. Converted from the built-in dagweave "Commit and push a working directory" blueprint.

Install v1.0.2

Installs the template into your Argo namespace. The URL is pinned to this version.

kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/git-commit-push/1.0.2/template.yaml

Or with the Argo CLI:

argo template create -n argo https://catalog.dagweave.com/api/v1/items/git-commit-push/1.0.2/template.yaml

Facts

Category
Git
Tags
git
Entrypoint
commit-push
Template SHA-256
6595375d6356baedd8ebadd5fd67d7f8baa649f91cc3a432b83528da15a08a9c
Source
git-commit-push at catalog commit 67458f7
API
item document, latest template.yaml

Images and provenance

Every image is pinned by digest, so a rebuilt tag can never change what this version runs.

RepositoryTagDigest
alpine/git2.54.0sha256:ac6c828f15d82775d204d3d75112e1d34af8945da80ccf922713c9891ba68e7a

Parameters

NameDescriptionDefault
branch required main
commit-message required none
author-email workflow-bot@dagweave.com
author-name workflow-bot
password-key password
path Directory containing the checked-out repo to commit. /work
secret-name Kubernetes Secret with the git username/password keys. git-credentials
username-key username

WorkflowTemplate

Download template.yaml

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: git-commit-push
  labels:
    dagweave.io/catalog-item: git-commit-push
  annotations:
    dagweave.io/catalog-version: "1.0.2"
    dagweave.io/catalog-category: "Git"
spec:
  entrypoint: commit-push
  templates:
    - name: commit-push
      inputs:
        parameters:
          # Working directory containing the checked-out repo to commit.
          - name: path
            default: /work
          - name: commit-message
          - name: author-name
            default: workflow-bot
          - name: author-email
            default: workflow-bot@dagweave.com
          # Branch to push HEAD to.
          - name: branch
            default: main
          # Secret holding git credentials (username/password keys).
          - name: secret-name
            default: git-credentials
          - name: username-key
            default: username
          - name: password-key
            default: password
      container:
        # alpine/git:2.54.0
        image: alpine/git@sha256:ac6c828f15d82775d204d3d75112e1d34af8945da80ccf922713c9891ba68e7a
        command: [sh, -c]
        # Reproduces the old dagweave "Commit and push a working directory" blueprint: commit the
        # working tree and push it back to its remote. Same semantics — a no-op
        # exit 0 when there is nothing to commit, and `push origin HEAD:<branch>`.
        args:
          - |
            set -eu
            cd "${WORK_DIR}"
            git config user.name "${AUTHOR_NAME}"
            git config user.email "${AUTHOR_EMAIL}"
            git add -A
            git commit -m "${COMMIT_MESSAGE}" || { echo "nothing to commit"; exit 0; }
            git config credential.helper \
              '!f() { echo "username=${GIT_USER}"; echo "password=${GIT_PASSWORD}"; }; f'
            git push origin "HEAD:${BRANCH}"
        env:
          - name: WORK_DIR
            value: "{{inputs.parameters.path}}"
          - name: COMMIT_MESSAGE
            value: "{{inputs.parameters.commit-message}}"
          - name: AUTHOR_NAME
            value: "{{inputs.parameters.author-name}}"
          - name: AUTHOR_EMAIL
            value: "{{inputs.parameters.author-email}}"
          - name: BRANCH
            value: "{{inputs.parameters.branch}}"
          - name: GIT_USER
            valueFrom:
              secretKeyRef:
                name: "{{inputs.parameters.secret-name}}"
                key: "{{inputs.parameters.username-key}}"
          - name: GIT_PASSWORD
            valueFrom:
              secretKeyRef:
                name: "{{inputs.parameters.secret-name}}"
                key: "{{inputs.parameters.password-key}}"

Version history

Read from the item's changelog. Each version has its own JSON document; the pinned catalogue vendors the manifest of the latest one, so that is the version that installs.

  1. 1.0.2 latest 2026-10-19

    Repin alpine/git:2.54.0 on the tag's current digest. What is still open against it is recorded in hack/image-cve-exceptions.txt. Same tool, same arguments; nothing about what the step runs changes.

    kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/git-commit-push/1.0.2/template.yaml
    argo template create -n argo https://catalog.dagweave.com/api/v1/items/git-commit-push/1.0.2/template.yaml

    version document, template.yaml

  2. 1.0.1 2026-08-02

    Move alpine/git from 2.45.2 to 2.54.0. Clears all 55 fixable CRITICAL/HIGH; the image now scans clean.

    This release is documented, but its manifest is not vendored here, so it has no install command. Version document

  3. 1.0.0 2026-07-17

    Initial release. Converted from the built-in git-commit-push blueprint.

    This release is documented, but its manifest is not vendored here, so it has no install command. Version document

Run it once

After installing, from the command line.

argo submit -n argo --from workflowtemplate/git-commit-push \
  -p branch=... \
  -p commit-message=...

Workflow that references it

A Workflow with the required parameters filled from the examples.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: git-commit-push-
spec:
  workflowTemplateRef:
    name: git-commit-push
  arguments:
    parameters:
      - name: branch
        value: "..."
      - name: commit-message
        value: "..."

As a step of a larger workflow

steps:
  - - name: git-commit-push
      templateRef:
        name: git-commit-push
        template: commit-push