Skip to content
English
  • There are no suggestions because the search field is empty.

Isolating Action Outputs per Stage in Kargo

How to prevent overwriting of outputs when multiple stages reuse the same Action name

  • You have multiple Stages (e.g., for US-WEST, US-EAST, etc.).

  • Each stage runs a git-push Action with as: deploy-push.

  • Later steps reference outputs["deploy-push"].commit.

  • Since Kargo stores outputs per steps/Promotions, not per Stage, all Actions using the same as: key collide.

  • The last stage to finish overwrites outputs["deploy-push"].

This results in inconsistent desiredRevision values in your Argo CD Application specs.

 

You can give each Action a unique as: name per Stage. Then reference that name in the outputs lookup.

- as: deploy-push-us-east-02a
  config:
    path: tmp/deploy-git
    targetBranch: main
  uses: git-push

- config:
    apps:
      - name: test-us-east-02a-storage-prod
        sources:
          - desiredRevision: $
            repoURL: <my-repo-url>
            updateTargetRevision: true

Key Notes

  • Outputs are stored per steps/Promotions (not isolated per Stage).

  • Reusing the same as: key means overwriting happens.

  • Always give Actions unique names if you need to consume their outputs later.

References