Skip to content

Commit

Permalink
feat: add support for target input (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmihir authored Jan 29, 2025
1 parent e11dd6b commit 55cf9a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This action does the following:
2. Scans the built docker image for secrets with [Trufflehog](https://github.com/trufflesecurity/trufflehog).
- GitHub action fails if secrets are found in the docker image
3. Pushes the docker image to a docker repository if no secrets are found
(when push is set to `true`).
(when push is set to `true`).
4. Signs the docker image


Expand Down Expand Up @@ -47,6 +47,7 @@ This GitHub Action only accepts the following inputs.
- `sbom`
- `secret-envs`
- `tags`
- `target`

If you want to use an input which is not in the above mentioned list,
feel free to contribute or reach out to infra team for support.
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ inputs:
tags:
description: "List of tags"
required: false
target:
description: "Set the target build stage to build"
required: false

outputs:
imageid:
Expand Down Expand Up @@ -75,6 +78,7 @@ runs:
secret-envs: ${{ inputs.secret-envs }}
cache-from: ${{ inputs.cache-from }}
cache-to: ${{ inputs.cache-to }}
target: ${{ inputs.target }}
outputs: type=docker,dest=${{ runner.temp }}/local-docker-image.tar

- name: Scan docker image with TruffleHog
Expand Down Expand Up @@ -105,6 +109,7 @@ runs:
secret-envs: ${{ inputs.secret-envs }}
cache-from: ${{ inputs.cache-from }}
cache-to: ${{ inputs.cache-to }}
target: ${{ inputs.target }}

- name: Sign the images with GitHub OIDC Token
env:
Expand Down

0 comments on commit 55cf9a4

Please sign in to comment.