Skip to content

Commit

Permalink
AAE-29319 Force creation of preview version
Browse files Browse the repository at this point in the history
  • Loading branch information
shsahahyland committed Dec 16, 2024
1 parent a696dd3 commit d49660f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/actions/docker-build-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ inputs:
description: The label name for creating a preview version
required: false
default: 'preview'
force-preview:
description: Force create the preview version
required: false
default: 'false'
outputs:
ecr-docker-image-url:
description: The ECR docker image URL
Expand All @@ -63,7 +67,7 @@ runs:
steps:
- name: Set is_preview env variable
env:
IS_PREVIEW: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, inputs.preview-label) || contains(github.event.pull_request.labels.*.name, inputs.preview-label.default) )}}
IS_PREVIEW: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, inputs.preview-label) || contains(github.event.pull_request.labels.*.name, inputs.preview-label.default) || inputs.force-preview == 'true' )}}
shell: bash
run: |
echo "IS_PREVIEW=$IS_PREVIEW" >> $GITHUB_ENV
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ When using OIDC on AWS, inputs `aws-access-key-id` and `aws-secret-access-key` c
# grype-scan-enabled: true # optional
# grype-fail-build: true # optional
# preview-label: ${{ vars.PREVIEW_LABEL }} # optional
# force-preview: true # optional
```

The returned output is the ECR image digest.
Expand Down

0 comments on commit d49660f

Please sign in to comment.