Use this action to promote (copy) an image in Amazon Elastic Container Registry (Amazon ECR).
Automatic artifact data reporting
This action reports artifact-related data to the workflow run for artifact traceability purposes.
Do not include the CloudBees action: Register a build artifact for the same artifact version, as the resulting run would register duplicate artifact entries to CloudBees platform.
| All CloudBees action repositories are listed at CloudBees, Inc. on GitHub. |
Inputs
| Input name | Data type | Required? | Description |
|---|---|---|---|
|
String |
No |
The name of the artifact, used when registering the build artifact in CloudBees platform. By default the target repository name is used. |
|
String |
No |
The ID of the component associated with the artifact. If not provided, the artifact is registered with the component of the current workflow run. Default is |
|
String |
Yes |
The Amazon ECR registry URL. |
|
String |
Yes |
The Amazon ECR source repository name. |
|
String |
Yes |
The Amazon ECR source image tag. |
|
String |
Required only if |
The Amazon ECR target repository name. |
|
String |
Required only if the |
The Amazon ECR target image tag. |
Outputs
| Output name | Data type | Description |
|---|---|---|
|
String |
The unique identifier of the artifact reported to CloudBees platform. |
Usage examples
Basic example
The following is a basic example of using this action:
- name: Promote an image in ECR uses: cloudbees-io/ecr-promote-image@v1 with: registry-url: ${{ vars.EC_REGISTRY_URL }} source-repository-name: my-ecr-repo-name source-tag: 6
Using optional inputs
The following example specifies the target-repository-name, required in this case because the source and target tags are identical:
- name: Promote an image in ECR uses: cloudbees-io/ecr-promote-image@v1 with: registry-url: ${{ vars.REGISTRY_URL }} source-repository-name: my-source-repo-name source-tag: 2 target-repository-name: my-target-repo-name target-tag: 2