Skip to content

Add input validation and environment variable mapping for deployment workflows#758

Closed
Copilot wants to merge 1 commit into
psl-30705from
copilot/sub-pr-757
Closed

Add input validation and environment variable mapping for deployment workflows#758
Copilot wants to merge 1 commit into
psl-30705from
copilot/sub-pr-757

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 6, 2026

GitHub Actions workflows were passing inputs directly to deployment steps without validation, risking misconfiguration and late-stage failures. This adds early validation and standardizes input handling via environment variables.

Changes

  • Input validation step - Added validation for all required inputs (ENV_NAME, AZURE_LOCATION, RESOURCE_GROUP_NAME, etc.) at workflow start. Checks presence, format, and validates optional resource IDs if provided. Fails fast with clear error messages.

  • Environment variable mapping - Replaced direct ${{ inputs.* }} references with environment variables (e.g., INPUT_RESOURCE_GROUP_NAME, INPUT_WAF_ENABLED). All deployment steps now consume validated variables instead of raw inputs.

  • Applied to both workflows - Changes implemented in both .github/workflows/job-deploy-linux.yml and .github/workflows/job-deploy-windows.yml for consistency.

Example validation:

- name: Validate Workflow Input Parameters
  run: |
    if [ -z "${{ inputs.ENV_NAME }}" ]; then
      echo "::error::ENV_NAME is required"
      exit 1
    fi
    echo "INPUT_ENV_NAME=${{ inputs.ENV_NAME }}" >> $GITHUB_ENV

Subsequent steps reference $INPUT_ENV_NAME instead of ${{ inputs.ENV_NAME }}, ensuring validated values throughout the workflow.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix input parameter validation and environment variable management Add input validation and environment variable mapping for deployment workflows Jan 6, 2026
Copilot AI requested a review from Vamshi-Microsoft January 6, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants