Skip to content

Commit

Permalink
fix plumbing of command
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Dolitsky <[email protected]>
  • Loading branch information
jdolitsky committed Jul 17, 2023
1 parent 2a8a295 commit 3c7eade
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
- uses: jdolitsky/wolfi-act@main
with:
packages: grype
debug: true
command: |
grype cgr.dev/chainguard/nginx
echo "---"
Expand Down
10 changes: 8 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ inputs:
description: "Whether or not to add debug logging"
required: false
default: 'false'

runs:
using: "composite"
steps:
Expand All @@ -28,6 +29,11 @@ runs:
set -x
fi
if [[ "${{inputs.command}}" == "" ]]; then
echo "Missing input: command"
exit 1
fi
cat >./wolfi-act.apko.config.yaml <<EOL
contents:
repositories:
Expand Down Expand Up @@ -84,11 +90,11 @@ runs:
-v ${PWD}:/work \
-w /work \
wolfi-act:latest-amd64 \
bash -exc "${CMD}"
bash -exc "${{ inputs.command }}"
else
docker run -i --rm --platform linux/amd64 \
-v ${PWD}:/work \
-w /work \
wolfi-act:latest-amd64 \
bash -ec "${CMD}"
bash -ec "${{ inputs.command }}"
fi

0 comments on commit 3c7eade

Please sign in to comment.