From ab5ee40ad064ea5b09ea27a4838fc61dfa735ea4 Mon Sep 17 00:00:00 2001 From: RJ Sampson Date: Mon, 1 Jul 2024 20:31:37 -0600 Subject: [PATCH] fix: Use cosign container ID instead of set name In case container name's conflict Signed-off-by: RJ Sampson --- sign/action.yml | 4 ++-- verify/action.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sign/action.yml b/sign/action.yml index 85d2837..bc34655 100644 --- a/sign/action.yml +++ b/sign/action.yml @@ -32,8 +32,8 @@ runs: shell: bash run: | docker pull cgr.dev/chainguard/cosign:latest - docker run -d --name cosign cgr.dev/chainguard/cosign:latest - docker cp cosign:/usr/bin/cosign /usr/local/bin/cosign + CONTAINER_ID=$(docker run -d cgr.dev/chainguard/cosign:latest) + docker cp "${CONTAINER_ID}":/usr/bin/cosign /usr/local/bin/cosign - name: Sign container image shell: bash diff --git a/verify/action.yml b/verify/action.yml index 647fd78..69009aa 100644 --- a/verify/action.yml +++ b/verify/action.yml @@ -30,8 +30,8 @@ runs: shell: bash run: | docker pull cgr.dev/chainguard/cosign:latest - docker run -d --name cosign cgr.dev/chainguard/cosign:latest - docker cp cosign:/usr/bin/cosign /usr/local/bin/cosign + CONTAINER_ID=$(docker run -d cgr.dev/chainguard/cosign:latest) + docker cp "${CONTAINER_ID}":/usr/bin/cosign /usr/local/bin/cosign - name: Verify container shell: bash