forked from Azure-Samples/github-runner-on-aks
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (40 loc) · 1.23 KB
/
deployApp.yaml
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
# This is a basic workflow to help you get started with Actions
name: Deploy Sample App
env:
RESOURCE_GROUP: 'aksrunners-rg'
CLUSTER_NAME: 'aksrunners-aks'
# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
push:
branches:
- main
paths:
- 'sampleapp/**'
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
actions: read
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-and-deploy:
runs-on: self-hosted
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: 'Az CLI login'
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Set AKS context
id: set-context
uses: azure/aks-set-context@v3
with:
resource-group: '${{ env.RESOURCE_GROUP }}'
cluster-name: '${{ env.CLUSTER_NAME }}'
- name: Install Runner
run: |
kubectl apply -f ./sampleapp/app-deployment.yaml