-
Notifications
You must be signed in to change notification settings - Fork 14
68 lines (60 loc) · 1.69 KB
/
deploy-aks.yml
File metadata and controls
68 lines (60 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Deploy AKS (Test)
on:
push:
paths:
- ".github/workflows/deploy-aks.yml"
- ".github/workflows/deploy-aks-callable.yml"
- "infrastructure_references/aks/scripts/deploy-aks.sh"
- "infrastructure_references/aks/configs/**"
workflow_dispatch:
inputs:
location:
description: "Azure region (e.g., westus3, westeurope, westus2)"
required: true
type: string
default: "westus3"
command:
description: "deploy-aks.sh command to run"
required: false
type: choice
default: "all"
options:
- "all"
permissions:
id-token: write
contents: read
jobs:
init:
runs-on: ubuntu-latest
outputs:
location: ${{ steps.params.outputs.location }}
command: ${{ steps.params.outputs.command }}
steps:
- name: Set deployment parameters
id: params
env:
EVENT_NAME: ${{ github.event_name }}
LOCATION_IN: ${{ inputs.location }}
COMMAND_IN: ${{ inputs.command }}
run: |
set -euo pipefail
if [ "${EVENT_NAME}" = "push" ]; then
{
echo "location=westus3"
echo "command=all"
} >> "$GITHUB_OUTPUT"
else
location="${LOCATION_IN:-westus3}"
command="${COMMAND_IN:-deploy-aks}"
{
echo "location=${location}"
echo "command=${command}"
} >> "$GITHUB_OUTPUT"
fi
call-deployment:
needs: init
uses: ./.github/workflows/deploy-aks-callable.yml
with:
location: ${{ needs.init.outputs.location }}
command: ${{ needs.init.outputs.command }}
secrets: inherit