Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support for buildx #37

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
only change context for custom socket
Signed-off-by: ashnamehrotra <[email protected]>
  • Loading branch information
ashnamehrotra committed Feb 14, 2024
commit cae27f15fd76a1349a0f0eeca5d7e4adaf75949b
5 changes: 4 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -66,10 +66,12 @@ jobs:
run: |
set -ex
export SOCKET="/var/run/docker.sock"
export CONTEXT="default"

if [ "${{ matrix.test-type }}" = "custom-socket" ]; then
url=$(docker context inspect | jq -r .[0].Endpoints.docker.Host)
SOCKET=$(echo "$url" | awk -F// '{print $2}')
CONTEXT="setup-docker-action"
fi

docker build --build-arg copa_version=${COPA_VERSION} -t copa-action .
@@ -80,5 +82,6 @@ jobs:
--name=copa-action \
copa-action 'docker.io/openpolicyagent/opa:0.46.0' 'opa.0.46.0.json' '0.46.0-patched' '10m' "${{ matrix.test-type }}" 'openvex' 'output.json'

docker -c "setup-docker-action" save -o patched.tar openpolicyagent/opa:0.46.0-patched
docker -c "$CONTEXT" save -o patched.tar openpolicyagent/opa:0.46.0-patched
Copy link
Member

@sozercan sozercan Feb 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we saving to a tarball? because trivy can't scan it? if so, can you add a note

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I did some research but I couldn't find a way to get trivy access without saving to tarball. Added a note for that!


bats --print-output-on-failure ./test/test.bats
Loading