{
  "name": "git-commit-push",
  "title": "Commit and push a working directory",
  "category": "Git",
  "tags": [
    "git"
  ],
  "version": "1.0.2",
  "date": "2026-10-19",
  "notes": "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.",
  "latest": true,
  "installable": true,
  "url": "https://catalog.dagweave.com/api/v1/items/git-commit-push/1.0.2.json",
  "templateUrl": "https://catalog.dagweave.com/api/v1/items/git-commit-push/1.0.2/template.yaml",
  "entrypoint": "commit-push",
  "parameters": [
    {
      "name": "branch",
      "title": "Target branch",
      "type": "string",
      "required": true,
      "default": "main"
    },
    {
      "name": "commit-message",
      "title": "Commit message",
      "type": "string",
      "required": true
    },
    {
      "name": "author-email",
      "title": "Author email",
      "type": "string",
      "required": false,
      "default": "workflow-bot@dagweave.com"
    },
    {
      "name": "author-name",
      "title": "Author name",
      "type": "string",
      "required": false,
      "default": "workflow-bot"
    },
    {
      "name": "password-key",
      "title": "Password key",
      "type": "string",
      "required": false,
      "default": "password"
    },
    {
      "name": "path",
      "title": "Working directory",
      "description": "Directory containing the checked-out repo to commit.",
      "type": "string",
      "required": false,
      "default": "/work"
    },
    {
      "name": "secret-name",
      "title": "Credentials secret name",
      "description": "Kubernetes Secret with the git username/password keys.",
      "type": "string",
      "required": false,
      "default": "git-credentials"
    },
    {
      "name": "username-key",
      "title": "Username key",
      "type": "string",
      "required": false,
      "default": "username"
    }
  ],
  "images": [
    {
      "ref": "alpine/git@sha256:ac6c828f15d82775d204d3d75112e1d34af8945da80ccf922713c9891ba68e7a",
      "repository": "alpine/git",
      "tag": "2.54.0",
      "digest": "sha256:ac6c828f15d82775d204d3d75112e1d34af8945da80ccf922713c9891ba68e7a"
    }
  ],
  "install": {
    "kubectl": "kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/git-commit-push/1.0.2/template.yaml",
    "argo": "argo template create -n argo https://catalog.dagweave.com/api/v1/items/git-commit-push/1.0.2/template.yaml"
  },
  "template": "apiVersion: argoproj.io/v1alpha1\nkind: WorkflowTemplate\nmetadata:\n  name: git-commit-push\n  labels:\n    dagweave.io/catalog-item: git-commit-push\n  annotations:\n    dagweave.io/catalog-version: \"1.0.2\"\n    dagweave.io/catalog-category: \"Git\"\nspec:\n  entrypoint: commit-push\n  templates:\n    - name: commit-push\n      inputs:\n        parameters:\n          # Working directory containing the checked-out repo to commit.\n          - name: path\n            default: /work\n          - name: commit-message\n          - name: author-name\n            default: workflow-bot\n          - name: author-email\n            default: workflow-bot@dagweave.com\n          # Branch to push HEAD to.\n          - name: branch\n            default: main\n          # Secret holding git credentials (username/password keys).\n          - name: secret-name\n            default: git-credentials\n          - name: username-key\n            default: username\n          - name: password-key\n            default: password\n      container:\n        # alpine/git:2.54.0\n        image: alpine/git@sha256:ac6c828f15d82775d204d3d75112e1d34af8945da80ccf922713c9891ba68e7a\n        command: [sh, -c]\n        # Reproduces the old dagweave \"Commit and push a working directory\" blueprint: commit the\n        # working tree and push it back to its remote. Same semantics — a no-op\n        # exit 0 when there is nothing to commit, and `push origin HEAD:\u003cbranch\u003e`.\n        args:\n          - |\n            set -eu\n            cd \"${WORK_DIR}\"\n            git config user.name \"${AUTHOR_NAME}\"\n            git config user.email \"${AUTHOR_EMAIL}\"\n            git add -A\n            git commit -m \"${COMMIT_MESSAGE}\" || { echo \"nothing to commit\"; exit 0; }\n            git config credential.helper \\\n              '!f() { echo \"username=${GIT_USER}\"; echo \"password=${GIT_PASSWORD}\"; }; f'\n            git push origin \"HEAD:${BRANCH}\"\n        env:\n          - name: WORK_DIR\n            value: \"{{inputs.parameters.path}}\"\n          - name: COMMIT_MESSAGE\n            value: \"{{inputs.parameters.commit-message}}\"\n          - name: AUTHOR_NAME\n            value: \"{{inputs.parameters.author-name}}\"\n          - name: AUTHOR_EMAIL\n            value: \"{{inputs.parameters.author-email}}\"\n          - name: BRANCH\n            value: \"{{inputs.parameters.branch}}\"\n          - name: GIT_USER\n            valueFrom:\n              secretKeyRef:\n                name: \"{{inputs.parameters.secret-name}}\"\n                key: \"{{inputs.parameters.username-key}}\"\n          - name: GIT_PASSWORD\n            valueFrom:\n              secretKeyRef:\n                name: \"{{inputs.parameters.secret-name}}\"\n                key: \"{{inputs.parameters.password-key}}\"\n",
  "templateSha256": "6595375d6356baedd8ebadd5fd67d7f8baa649f91cc3a432b83528da15a08a9c",
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/git-commit-push",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
