new pr bicep demo
هذا الالتزام موجود في:
47
.github/workflows/pr-validation.yml
مباع
Normal file
47
.github/workflows/pr-validation.yml
مباع
Normal file
@@ -0,0 +1,47 @@
|
||||
name: pr-validation
|
||||
concurrency: ${{ github.event.number }}
|
||||
|
||||
on: pull_request
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
|
||||
env:
|
||||
resourceGroupName: pr_${{ github.event.number }}
|
||||
resourceGroupLocation: eastus
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
uses: ./.github/workflows/lint.yml
|
||||
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: azure/login@v1
|
||||
name: Sign in to Azure
|
||||
with:
|
||||
client-id: ${{ secrets.AZURE_CLIENT_ID }}
|
||||
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
|
||||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
||||
- uses: Azure/cli@v1
|
||||
name: Create resource group
|
||||
with:
|
||||
inlineScript: |
|
||||
az group create \
|
||||
--name ${{ env.resourceGroupName }} \
|
||||
--location ${{ env.resourceGroupLocation }}
|
||||
- uses: azure/arm-deploy@v1
|
||||
id: deploy
|
||||
name: Deploy Bicep file
|
||||
with:
|
||||
failOnStdErr: false
|
||||
deploymentName: ${{ github.run_number }}
|
||||
resourceGroupName: ${{ env.resourceGroupName }}
|
||||
template: ./bicep/main.bicep
|
||||
parameters: >
|
||||
environmentType=Test
|
||||
- name: Show website hostname
|
||||
run: |
|
||||
echo "Access the website at this address: https://${{ steps.deploy.outputs.appServiceAppHostName }}"
|
المرجع في مشكلة جديدة
حظر مستخدم