Skip to content

Commit

Permalink
test action
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvija Tovernic committed Sep 19, 2024
1 parent 700886c commit 333ca87
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/packer-build-if-vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,22 @@ jobs:
with:
creds: ${{ env.AZURE_CREDENTIALS }}

This step fails with ERROR: (ResourceNotFound) The Resource 'Microsoft.Compute/galleries/wp10silvijaACG/images/image-factory-vm' under resource group 'wp10-silvija-rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
This makes my github action fail.
How can I make it proceed?

- name: Create Image Definition
uses: azure/cli@v2
with:
azcliversion: 2.64.0
inlineScript: |
set +e
image_definition_exists=$(az sig image-definition show \
--resource-group "$AZURE_RESOURCE_GROUP" \
--gallery-name "$AZURE_ACG" \
--gallery-image-definition "$IMAGE_NAME" \
--query "name" -o tsv 2>/dev/null)
--query "name" -o tsv)
set -e
if [ -z "$image_definition_exists" ]; then
echo "Image definition does not exist. Creating it..."
az sig image-definition create \
Expand Down

0 comments on commit 333ca87

Please sign in to comment.