From 970afe7b179188eaa1f82cfb78eea137da941773 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 13 May 2022 10:53:13 +1000 Subject: [PATCH] Use a generic alphabetical pattern rather than a regex group Google Cloud doesn't seem to support regex groups. --- .github/workflows/deploy-gcp-tests.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-gcp-tests.yml b/.github/workflows/deploy-gcp-tests.yml index 322db2c03..cc69e43dd 100644 --- a/.github/workflows/deploy-gcp-tests.yml +++ b/.github/workflows/deploy-gcp-tests.yml @@ -215,15 +215,17 @@ jobs: # Try to find an image generated from the main branch # Fields are listed in the "Create image from state disk" step # - # TODO: require ${NETWORK} in the name after PR #4391 merges to main and runs a full sync - CACHED_DISK_NAME=$(gcloud compute images list --verbosity=debug --filter="name~${{ inputs.disk_prefix }}-main-[0-9a-f]+-v${LOCAL_STATE_VERSION}-(${NETWORK})?-${{ inputs.disk_suffix }}" --format="value(NAME)" --sort-by=~creationTimestamp --limit=1) + # TODO: require ${NETWORK} in the name after PR #4391 merges to main, and runs a full sync + # network should replace [a-z]* + CACHED_DISK_NAME=$(gcloud compute images list --verbosity=debug --filter="name~${{ inputs.disk_prefix }}-main-[0-9a-f]+-v${LOCAL_STATE_VERSION}-[a-z]*-${{ inputs.disk_suffix }}" --format="value(NAME)" --sort-by=~creationTimestamp --limit=1) echo "main Disk: $CACHED_DISK_NAME" if [[ -z "$CACHED_DISK_NAME" ]]; then # Try to find an image generated from any other branch # # TODO: require ${NETWORK} in the name after PRs #4391 and #4385 merge to main - CACHED_DISK_NAME=$(gcloud compute images list --verbosity=debug --filter="name~${{ inputs.disk_prefix }}-.+-[0-9a-f]+-v${LOCAL_STATE_VERSION}-(${NETWORK})?-${{ inputs.disk_suffix }}" --format="value(NAME)" --sort-by=~creationTimestamp --limit=1) + # network should replace [a-z]* + CACHED_DISK_NAME=$(gcloud compute images list --verbosity=debug --filter="name~${{ inputs.disk_prefix }}-.+-[0-9a-f]+-v${LOCAL_STATE_VERSION}-[a-z]*-${{ inputs.disk_suffix }}" --format="value(NAME)" --sort-by=~creationTimestamp --limit=1) echo "Disk: $CACHED_DISK_NAME" fi