Skip to content

Commit 8fdd8c8

Browse files
committed
wip3
1 parent bbdd84a commit 8fdd8c8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/docker-build.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,11 @@ jobs:
7777
cache-from: type=gha
7878
cache-to: type=gha,mode=max
7979

80-
- name: Get image digest
80+
- name: Get primary image tag
8181
id: image_digest
82-
run: echo "IMAGE_DIGEST=${{ steps.meta.outputs.tags }}" >> $GITHUB_OUTPUT
82+
run: |
83+
PRIMARY_TAG=$(echo "${{ steps.meta.outputs.tags }}" | head -n 1)
84+
echo "IMAGE_DIGEST=${PRIMARY_TAG}" >> $GITHUB_OUTPUT
8385
8486
test:
8587
needs: build
@@ -96,15 +98,13 @@ jobs:
9698
9799
- name: Pull Docker image
98100
run: |
99-
# Extract the first tag from the tags list
100-
IMAGE_TAG=$(echo "${{ needs.build.outputs.image_digest }}" | tr ' ' '\n' | head -n 1)
101+
IMAGE_TAG="${{ needs.build.outputs.image_digest }}"
101102
echo "Using image: ${IMAGE_TAG}"
102103
docker pull ${IMAGE_TAG}
103104
104105
- name: Run tests in container
105106
run: |
106-
# Extract the first tag from the tags list
107-
IMAGE_TAG=$(echo "${{ needs.build.outputs.image_digest }}" | tr ' ' '\n' | head -n 1)
107+
IMAGE_TAG="${{ needs.build.outputs.image_digest }}"
108108
109109
# Run the container with test environment
110110
docker run --name cws-test -d \

0 commit comments

Comments
 (0)