Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Add azd provision workflow to automate Azure infrastructure provisioning

Aperta
#7 0 commenti 1 reazione 1 assegnatario Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

This repository lacks a GitHub Actions workflow within .github/workflows/ that runs azd provision.

Adding a CI workflow that provisions (and later deploys) infrastructure via the Azure Developer CLI improves reliability and makes onboarding smoother.

Required Action

Add a workflow similar to the standard azure-dev.yaml used in Azure Samples. A minimal example:

name: Deploy to Azure with azd
on:
  workflow_dispatch:
  push:
    branches: [ main ]

permissions:
  id-token: write
  contents: read

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v5

      - name: Install azd
        uses: Azure/setup-azd@v2

      - name: Azure login (federated)
        run: |
          azd auth login --client-id "$AZURE_CLIENT_ID" \
            --tenant-id "$AZURE_TENANT_ID" --federated-credential-provider github
        env:
          AZURE_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }}
          AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }}

      - name: Provision Infrastructure
        run: |
          azd provision --no-prompt
        env:
          AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
          AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
          AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}

      - name: Deploy Application
        run: |
          azd deploy --no-prompt
        env:
          AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
          AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
          AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}

For a more complete example (including environment variables based off main.parameters.json),
see https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/.github/workflows/azure-dev.yml

Rationale

  • Ensures infra is provisioned consistently by automation
  • Enables repeatable environments via azd
  • Aligns with current Azure Developer CLI best practices

After adding the workflow, ensure required org/repo variables and federated credentials are configured (run azd pipeline config locally if needed).

Lingua principale
Python
Stelle
383
Fork
295
Merge medio
3g 13h
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Azure-Samples/python-openai-demos

Tutte le issue di Azure-Samples/python-openai-demos

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.