Skip to content

Commit

Permalink
Merge branch 'main' into sync/dotgithub/_c1290c5
Browse files Browse the repository at this point in the history
  • Loading branch information
ebronson68 committed Aug 9, 2023
2 parents e996bd4 + b9b9822 commit 6459518
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 19 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/aks-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ jobs:
environmentKeyVault: ${{ inputs.environmentKeyVault }}

- name: Generate build args from Azure Key Vaults
uses: azure/powershell@v1.2.0
uses: azure/powershell@v1
with:
inlineScript: |
if ("${{ inputs.environmentKeyVault }}") {
Expand Down Expand Up @@ -248,7 +248,7 @@ jobs:
azPSVersion: "latest"

- name: Login to Azure Container Registry
uses: Azure/docker-login@v1.0.1
uses: Azure/docker-login@v1
with:
login-server: ${{ secrets.registryHostName }}
username: ${{ secrets.registryUserName }}
Expand Down Expand Up @@ -318,7 +318,7 @@ jobs:
- name: Bake Helm Templates
id: bake
uses: azure/k8s-bake@v2.4
uses: azure/k8s-bake@v2
with:
renderEngine: "helm"
helmChart: ${{ inputs.chartsPath }}
Expand Down Expand Up @@ -393,7 +393,7 @@ jobs:

- name: Apply configMap if it exists
if: ${{ needs.build.outputs.configMap != null }}
uses: swdotcom/update-and-apply-kubernetes-configs@v1.2.0
uses: swdotcom/update-and-apply-kubernetes-configs@v1
with:
k8-config-file-paths: deployments/k8s/config-${{ inputs.environment }}.yaml

Expand All @@ -419,7 +419,7 @@ jobs:
}
- name: Create K8s Image Pull Secret
uses: Azure/k8s-create-secret@v4.0
uses: Azure/k8s-create-secret@v4
with:
container-registry-url: ${{ secrets.registryHostName }}
container-registry-username: ${{ secrets.registryUserName }}
Expand All @@ -428,7 +428,7 @@ jobs:

- name: Deploy to Azure Kubernetes Service
timeout-minutes: ${{ inputs.deploymentTimeout }}
uses: Azure/k8s-deploy@v4.9
uses: Azure/k8s-deploy@v4
with:
namespace: ${{ inputs.environment }}
manifests: ${{ needs.build.outputs.manifestsBundle }}
Expand Down Expand Up @@ -468,7 +468,7 @@ jobs:
enable-AzPSSession: true

- name: Create or Update Public DNS Record
uses: azure/powershell@v1.2.0
uses: azure/powershell@v1
with:
inlineScript: |
$NewRecords = New-AzDnsRecordConfig -Cname "${{ secrets.azureClusterName }}-${{ inputs.environment }}-ingress.centralus.cloudapp.azure.com."
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/clear-azure-redis-cache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Clear Azure Redis Cache

on:
workflow_call:
inputs:
environment:
required: true
type: string
description: "Environment to clear caches for."
resourceGroupName:
default: "AMU_DevOps_RG"
type: string
description: "Name of Resource Group that the Azure Redis Instance is in."
secrets:
azureCredentials:
required: true

jobs:
clear-redis-cache:
name: Clear Azure Redis Cache
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Login to Azure
uses: Andrews-McMeel-Universal/cache-azure-login@v1
with:
azureCredentials: "${{ secrets.azureCredentials }}"

- name: Install Dependencies
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: redis-tools
version: 1.0

# Script is adapted from https://github.com/Andrews-McMeel-Universal/azure-content-management_tool/blob/main/Scripts/rundeck/Flush-RedisCache.ps1
- name: Clear Redis Cache
uses: azure/powershell@v1
with:
inlineScript: |
# Check to see if Azure Redis Cache PowerShell Module is installed
Install-Module -Name Az.RedisCache -Confirm:$false -Force
# Get list of Redis instances using tags
$Redis = Get-AzRedisCache -ResourceGroupName "${{ inputs.resourceGroupName }}" | Where-Object { $_.Tag.Values -eq "${{ inputs.environment }}" }
# Loop through Redis instances
$Redis | ForEach-Object {
$RedisHostname = $_.HostName
$RedisPort = $_.Port
$RedisName = $_.Name
$RedisKey = (Get-AzRedisCacheKey -Name $RedisName -ResourceGroupName "${{ inputs.resourceGroupName }}").PrimaryKey
# Authenticate using Redis key and flush cache database
$RedisCommands = "AUTH $RedisKey
SELECT 0
FLUSHDB"
$RedisResult = $RedisCommands | redis-cli -h "$RedisHostname" -p "$RedisPort"
# Check if output from cache clearing command has correct status message
if ($RedisResult -match 'OK') {
Write-Host "Successfully flushed cache for $RedisHostname" -ForegroundColor Green
}
else {
Write-Error "Failed to clear cache for $RedisHostname"
}
}
azPSVersion: "latest"

4 changes: 2 additions & 2 deletions .github/workflows/dependabot-automations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
# will not occur.
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1.3.1
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Auto Approve Dependabot PRs
uses: hmarr/auto-approve-action@v2.0.0
uses: hmarr/auto-approve-action@v3.2.1
if: ${{ inputs.autoApprove && github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' }}
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mega-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
# Run the MegaLinter Github Action
- name: MegaLinter
id: ml
uses: oxsecurity/megalinter/flavors/cupcake@v6.20.1
uses: oxsecurity/megalinter/flavors/cupcake@v7
env:
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'workflow_dispatch' }}
GITHUB_TOKEN: ${{ secrets.PAT_ACTION_CI }}
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
# Run the MegaLinter Github Action
- name: MegaLinter
id: ml
uses: oxsecurity/megalinter/flavors/dotnet@v6.20.1
uses: oxsecurity/megalinter/flavors/dotnet@v7
env:
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'workflow_dispatch' }}
GITHUB_TOKEN: ${{ secrets.PAT_ACTION_CI }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/purge-cdn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check inputs
uses: azure/powershell@v1.2.0
uses: azure/powershell@v1
with:
azPSVersion: "latest"
inlineScript: |
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
enable-AzPSSession: true

- name: Purge CDN cache
uses: azure/powershell@v1.2.0
uses: azure/powershell@v1
with:
azPSVersion: "latest"
inlineScript: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-addns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
steps:
- name: Retrieve Application information
id: getappinfo
uses: azure/powershell@v1.2.0
uses: azure/powershell@v1
with:
azPSVersion: "latest"
inlineScript: |
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
echo "aksIngress=$aksIngress" >> $env:GITHUB_ENV
- name: Update Internal Boley DNS
uses: azure/powershell@v1.2.0
uses: azure/powershell@v1
with:
azPSVersion: "latest"
inlineScript: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update-azureapimanagement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:

- name: Login via PowerShell
if: ${{ inputs.azureUser && env.azurePassword && env.azureSubscription }}
uses: azure/powershell@v1.2.0
uses: azure/powershell@v1
with:
azPSVersion: "latest"
inlineScript: |
Expand All @@ -114,7 +114,7 @@ jobs:
- name: Retrieve Application information
id: getappinfo
uses: azure/powershell@v1.2.0
uses: azure/powershell@v1
with:
azPSVersion: "latest"
inlineScript: |
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
echo "aksIngress=$aksIngress" >> $env:GITHUB_ENV
- name: Update Azure API Management
uses: azure/powershell@v1.2.0
uses: azure/powershell@v1
with:
azPSVersion: "latest"
inlineScript: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wpe-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: actions/checkout@v2

- name: Deploy to WP Engine
uses: wpengine/github-action-wpe-site-deploy@v3.2.2
uses: wpengine/github-action-wpe-site-deploy@v3
with:
# Deploy vars
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPENGINE_ED25514 }}
Expand Down

0 comments on commit 6459518

Please sign in to comment.