Tag a ref and push the tag
Create an annotated git tag at a ref and push it to the remote. Clones the repository, tags it, and pushes the tag using credentials from a Kubernetes Secret.
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-tag/1.0.2/template.yaml
Or with the Argo CLI:
argo template create -n argo https://catalog.dagweave.com/api/v1/items/git-tag/1.0.2/template.yaml
Facts
- Category
- Git
- Tags
- git
- Entrypoint
tag- Template SHA-256
b6ca711d29c84f6eb8fc5fd6868d44bd83b5f19b1c3454a2e1e664cbd18c4fe3- Source
- git-tag 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.
| Repository | Tag | Digest |
|---|---|---|
alpine/git | 2.54.0 | sha256:ac6c828f15d82775d204d3d75112e1d34af8945da80ccf922713c9891ba68e7a |
Parameters
| Name | Description | Default |
|---|---|---|
repo-url required |
HTTPS clone URL of the repository. | none |
tag required |
Tag name to create and push. Example v1.2.3 |
none |
author-email |
workflow-bot@dagweave.com |
|
author-name |
workflow-bot |
|
message |
Annotation message. Defaults to the tag name if blank. | empty |
password-key |
password |
|
ref |
Branch, tag, or SHA the new tag should point at. | main |
secret-name |
Kubernetes Secret with the git username/password keys. | git-credentials |
username-key |
username |
WorkflowTemplate
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: git-tag
labels:
dagweave.io/catalog-item: git-tag
annotations:
dagweave.io/catalog-version: "1.0.2"
dagweave.io/catalog-category: "Git"
spec:
entrypoint: tag
templates:
- name: tag
inputs:
parameters:
- name: repo-url
# Tag name to create and push.
- name: tag
# Annotation message for the tag.
- name: message
default: ""
# Ref (branch/tag/SHA) the tag should point at.
- name: ref
default: main
- name: author-name
default: workflow-bot
- name: author-email
default: workflow-bot@dagweave.com
- 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]
# Clone the repo, create an annotated tag at a ref, and push the tag.
args:
- |
set -eu
git config --global credential.helper \
'!f() { echo "username=${GIT_USERNAME}"; echo "password=${GIT_PASSWORD}"; }; f'
git clone "${REPO_URL}" /work
cd /work
git config user.name "${AUTHOR_NAME}"
git config user.email "${AUTHOR_EMAIL}"
git checkout "${REF}"
git tag -a "${TAG}" -m "${MESSAGE:-${TAG}}"
git push origin "${TAG}"
env:
- name: REPO_URL
value: "{{inputs.parameters.repo-url}}"
- name: TAG
value: "{{inputs.parameters.tag}}"
- name: MESSAGE
value: "{{inputs.parameters.message}}"
- name: REF
value: "{{inputs.parameters.ref}}"
- name: AUTHOR_NAME
value: "{{inputs.parameters.author-name}}"
- name: AUTHOR_EMAIL
value: "{{inputs.parameters.author-email}}"
- name: GIT_USERNAME
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.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-tag/1.0.2/template.yamlargo template create -n argo https://catalog.dagweave.com/api/v1/items/git-tag/1.0.2/template.yaml -
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
-
1.0.0 2026-07-17
Initial release.
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-tag \
-p repo-url=... \
-p tag=v1.2.3
Workflow that references it
A Workflow with the required parameters filled from the examples.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: git-tag-
spec:
workflowTemplateRef:
name: git-tag
arguments:
parameters:
- name: repo-url
value: "..."
- name: tag
value: "v1.2.3"
As a step of a larger workflow
steps:
- - name: git-tag
templateRef:
name: git-tag
template: tag