GTO is open-source tool that helps you turn your Git repository into an Artifact Registry. Main features:
- Registry: Track new artifacts and their versions for releases and significant changes.
- Lifecycle Management: Create actionable stages for versions marking status of artifact or it's readiness to be consumed by a specific environment.
- GitOps: Signal CI/CD automation or other downstream systems to act upon these new versions and lifecycle updates.
The iterative/gto-action action is a Docker-based action that runs GTO against the Git tag that triggered CI and finds out what this tag does, whether it's a version registration, stage assignment or something else. This allows you to act accordingly upon this event.
v1of this action relied on GTO-based annotations (written toartifacts.yaml). Now deprecated.v2of this action relies on DVC-based annotations (written todvc.yaml).
This action can be run on ubuntu-latest only for now (let us know if you need
macos-latest or windows-latest).
Basic usage:
steps:
- uses: actions/checkout@v3
- id: gto
uses: iterative/gto-action@v2Pulling artifact with DVC:
steps:
- uses: actions/checkout@v3
- id: gto
uses: iterative/gto-action@v2
with:
pull: true
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}After pulling, the artifact can be found at ${{ steps.gto.outputs.path }}.
For a complete CI example, see
this workflow
in the GTO example repo.
The following inputs are supported.
pull- (optional) Whether to rundvc pullon the artifacts' path. If set to true, add necessary secrets that DVC will need to access the remote.show- (optional) Whether to rungto show.history- (optional) Whether to rungto history.print-outputs- (optional) Whether to print action outputs.
Note if the Git tag that triggered the workflow conforms the GTO format,
gto show $NAME and gto history $NAME are run each time regardless of these
options ($NAME is the name of artifact Git tag refers to).
event- Type of triggering eventname- The name of the artifactversion- The version of the artifactstage- The stage - if the events is a stage assignmenttype- The type of the artifact (if annotated)path- The path of the artifact (if annotated)description- The description of the artifact (if annotated)