Skip to content

Commit

Permalink
add secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvija Tovernic committed Sep 23, 2024
1 parent 5ad25e3 commit 1027930
Showing 1 changed file with 12 additions and 28 deletions.
40 changes: 12 additions & 28 deletions .github/workflows/reusable-workflow-packer-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,18 @@ on:
image-name:
required: true
type: string

secrets:
AZURE_CLIENT_ID:
required: true
AZURE_CLIENT_SECRET:
required: true
AZURE_TENANT_ID:
required: true
AZURE_SUBSCRIPTION_ID:
required: true
AZURE_TENANT_ID:
required: true

jobs:
packer-build:
runs-on: self-hosted
Expand Down Expand Up @@ -42,33 +53,6 @@ jobs:
with:
creds: ${{ env.AZURE_CREDENTIALS }}

# - name: Create Azure Image Definition
# uses: azure/cli@v2
# with:
# azcliversion: ${{ env.AZ_CLI_VERSION }}
# inlineScript: |
# set +e
# az sig image-definition show \
# --resource-group "$AZURE_RESOURCE_GROUP" \
# --gallery-name "$AZURE_ACG" \
# --gallery-image-definition "$IMAGE_NAME" \
# --query "name" -o tsv
# az_exit_code=$?
# set -e
# if [ $az_exit_code -eq 3 ]; then
# echo "Image definition does not exist. Creating it..."
# az sig image-definition create \
# --resource-group "$AZURE_RESOURCE_GROUP" \
# --gallery-name "$AZURE_ACG" \
# --gallery-image-definition "$IMAGE_NAME" \
# --publisher "$IMAGE_PUBLISHER" \
# --offer "$IMAGE_OFFER" \
# --sku "$IMAGE_SKU" \
# --os-type "$IMAGE_OS_TYPE"
# else
# echo "Image definition '$IMAGE_NAME' already exists."
# fi

- name: Create Azure Image Definition
run: |
set +e
Expand Down

0 comments on commit 1027930

Please sign in to comment.