diff --git a/.github/workflows/cache-test-images.yaml b/.github/workflows/cache-test-images.yaml index 6190b225a2..9de1d02e52 100644 --- a/.github/workflows/cache-test-images.yaml +++ b/.github/workflows/cache-test-images.yaml @@ -27,7 +27,7 @@ jobs: run: | source integration/testimages.ini IMAGE_LIST=$(skopeo list-tags docker://$TEST_IMAGES) - DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags | sort' | sha256sum | cut -d' ' -f1) + DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags |= sort' | sha256sum | cut -d' ' -f1) echo "digest=$DIGEST" >> $GITHUB_OUTPUT ## We need to work with test image cache only for main branch @@ -37,8 +37,6 @@ jobs: with: path: integration/testdata/fixtures/images key: cache-test-images-${{ steps.image-digest.outputs.digest }} - restore-keys: - cache-test-images- - name: Download test images if: github.ref_name == 'main' @@ -66,7 +64,7 @@ jobs: run: | source integration/testimages.ini IMAGE_LIST=$(skopeo list-tags docker://$TEST_VM_IMAGES) - DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags | sort' | sha256sum | cut -d' ' -f1) + DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags |= sort' | sha256sum | cut -d' ' -f1) echo "digest=$DIGEST" >> $GITHUB_OUTPUT ## We need to work with test VM image cache only for main branch @@ -76,8 +74,6 @@ jobs: with: path: integration/testdata/fixtures/vm-images key: cache-test-vm-images-${{ steps.image-digest.outputs.digest }} - restore-keys: - cache-test-vm-images- - name: Download test VM images if: github.ref_name == 'main' diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 69916e8e45..b8088cee47 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -86,7 +86,7 @@ jobs: run: | source integration/testimages.ini IMAGE_LIST=$(skopeo list-tags docker://$TEST_IMAGES) - DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags | sort' | sha256sum | cut -d' ' -f1) + DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags |= sort' | sha256sum | cut -d' ' -f1) echo "digest=$DIGEST" >> $GITHUB_OUTPUT - name: Restore test images from cache @@ -94,8 +94,6 @@ jobs: with: path: integration/testdata/fixtures/images key: cache-test-images-${{ steps.image-digest.outputs.digest }} - restore-keys: - cache-test-images- - name: Run integration tests run: mage test:integration @@ -140,7 +138,7 @@ jobs: run: | source integration/testimages.ini IMAGE_LIST=$(skopeo list-tags docker://$TEST_IMAGES) - DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags | sort' | sha256sum | cut -d' ' -f1) + DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags |= sort' | sha256sum | cut -d' ' -f1) echo "digest=$DIGEST" >> $GITHUB_OUTPUT - name: Restore test images from cache @@ -148,8 +146,6 @@ jobs: with: path: integration/testdata/fixtures/images key: cache-test-images-${{ steps.image-digest.outputs.digest }} - restore-keys: - cache-test-images- - name: Run module integration tests shell: bash @@ -177,7 +173,7 @@ jobs: run: | source integration/testimages.ini IMAGE_LIST=$(skopeo list-tags docker://$TEST_VM_IMAGES) - DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags | sort' | sha256sum | cut -d' ' -f1) + DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags |= sort' | sha256sum | cut -d' ' -f1) echo "digest=$DIGEST" >> $GITHUB_OUTPUT - name: Restore test VM images from cache @@ -185,8 +181,6 @@ jobs: with: path: integration/testdata/fixtures/vm-images key: cache-test-vm-images-${{ steps.image-digest.outputs.digest }} - restore-keys: - cache-test-vm-images- - name: Run vm integration tests run: | diff --git a/integration/testimages.ini b/integration/testimages.ini index 778fbc9b8e..1a7b8ef1a0 100644 --- a/integration/testimages.ini +++ b/integration/testimages.ini @@ -1,3 +1,3 @@ # Configuration file for both shell scripts and Go programs -TEST_IMAGES=ghcr.io/knqyf263/trivy-test-images -TEST_VM_IMAGES=ghcr.io/knqyf263/trivy-test-vm-images +TEST_IMAGES=ghcr.io/aquasecurity/trivy-test-images +TEST_VM_IMAGES=ghcr.io/aquasecurity/trivy-test-vm-images