Skip to content

Update invalid slugs #39

Update invalid slugs

Update invalid slugs #39

Workflow file for this run

# This workflow will deploy WordPress on Azure Container Apps
name: WordPress Deployment
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# The lint job performs linting on the bicep code
lint:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs the Bicep linter to ensure build is successful
- name: Run Bicep linter
run: az bicep build --file ./infra/main.bicep
validate:
runs-on: ubuntu-latest
needs: [lint]
steps:
- uses: actions/checkout@v3
- uses: azure/login@v1
name: Sign in to Azure
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- uses: azure/[email protected]
name: Run preflight validation
with:
deploymentName: ${{ github.run_number }}
scope: subscription
region: ${{ vars.AZURE_LOCATION }}
template: ./infra/main.bicep
parameters: environmentName=${{ vars.AZURE_ENV_NAME }}
location=${{ vars.AZURE_LOCATION }}
fqdn=${{ vars.AZURE_FQDN }}
applicationName=${{ vars.AZURE_APPLICATION_NAME }}
mariaDBPassword=${{ secrets.AZURE_MARIADB_PASSWORD }}
adminUsername=${{ vars.AZURE_ADMIN_USERNAME }}
adminPassword=${{ secrets.AZURE_ADMIN_PASSWORD }}
redisDeploymentOption=${{ vars.AZURE_REDIS_DEPLOYMENTOPTIONS }}
deploymentMode: Validate
preview:
runs-on: ubuntu-latest
needs: [lint, validate]
steps:
- uses: actions/checkout@v3
- uses: azure/login@v1
name: Sign in to Azure
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- uses: Azure/cli@v1
name: Run what-if
with:
azcliversion: 2.45.0
inlineScript: |
az deployment sub what-if \
--location ${{ vars.AZURE_LOCATION }} \
--template-file ./infra/main.bicep \
--parameters environmentName=${{ vars.AZURE_ENV_NAME }} \
--parameters location=${{ vars.AZURE_LOCATION }} \
--parameters fqdn=${{ vars.AZURE_FQDN }} \
--parameters applicationName=${{ vars.AZURE_APPLICATION_NAME }} \
--parameters mariaDBPassword=${{ secrets.AZURE_MARIADB_PASSWORD }} \
--parameters adminUsername=${{ vars.AZURE_ADMIN_USERNAME }} \
--parameters adminPassword=${{ secrets.AZURE_ADMIN_PASSWORD }} \
--parameters redisDeploymentOption=${{ vars.AZURE_REDIS_DEPLOYMENTOPTIONS }}
deploy:
runs-on: ubuntu-latest
needs: [preview]
steps:
- uses: actions/checkout@v3
- uses: azure/login@v1
name: Sign in to Azure
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- uses: azure/[email protected]
id: deployment
name: Deployment
with:
deploymentName: "GitHubAction-${{ github.run_number }}"
scope: subscription
region: ${{ vars.AZURE_LOCATION }}
template: ./infra//main.bicep
parameters: environmentName=${{ vars.AZURE_ENV_NAME }}
location=${{ vars.AZURE_LOCATION }}
fqdn=${{ vars.AZURE_FQDN }}
applicationName=${{ vars.AZURE_APPLICATION_NAME }}
mariaDBPassword=${{ secrets.AZURE_MARIADB_PASSWORD }}
adminUsername=${{ vars.AZURE_ADMIN_USERNAME }}
adminPassword=${{ secrets.AZURE_ADMIN_PASSWORD }}
redisDeploymentOption=${{ vars.AZURE_REDIS_DEPLOYMENTOPTIONS }}
failOnStdErr: false