Skip to content

Commit

Permalink
fix: [#99] added new input parameter for docker build context (#100)
Browse files Browse the repository at this point in the history
* fix: [#99] added new input parameter for docker build context

* fix: [#99] updated the README.md
  • Loading branch information
jherrerasbp authored Dec 27, 2024
1 parent a4701a1 commit d81aea7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
| Option | Default | Required |
| :------------------- | :------ | -------- |
| build-args | | |
| context | x | |
| dockle-accept-key | x | |
| images | x | |
| token | x | x |
Expand Down
12 changes: 8 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ inputs:
image that it has been built, to the packages repository of the GitHub
repository where the action has been run.
required: true
context:
default: "."
description: |
Directory path that contains all the files needed to build a Docker image
runs:
using: "composite"
steps:
Expand All @@ -45,7 +49,7 @@ runs:
#
- uses: hadolint/[email protected]
with:
dockerfile: Dockerfile
dockerfile: ${{ inputs.context }}/Dockerfile
#
# Determine image name and tag.
#
Expand All @@ -63,7 +67,7 @@ runs:
uses: docker/[email protected]
with:
build-args: APPLICATION=${{ inputs.build-args }}
context: .
context: ${{ inputs.context }}
labels: ${{ steps.meta.outputs.labels }}
push: false
tags: ${{ steps.meta.outputs.tags }}
Expand All @@ -90,7 +94,7 @@ runs:
with:
only-fixed: false
output-format: table
path: "."
path: ${{ inputs.context }}
severity-cutoff: high
- name: Scan image using Grype
uses: anchore/[email protected]
Expand All @@ -108,7 +112,7 @@ runs:
TRIVY_USERNAME: ${{ github.actor }}
with:
scan-type: "fs"
scan-ref: "."
scan-ref: ${{ inputs.context }}
exit-code: "1"
ignore-unfixed: true
severity: "CRITICAL,HIGH"
Expand Down

0 comments on commit d81aea7

Please sign in to comment.