-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (37 loc) · 1.61 KB
/
azure-windows-ad-auth.yml
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
name: Update azure-windows-ad-auth template
on:
push:
branches:
- main
paths:
- "templates/azure-windows-ad-auth/main.tf"
- "templates/azure-windows-ad-auth/Initialize.ps1.tftpl"
- "templates/azure-windows-ad-auth/FirstLogonCommands.xml"
- ".github/workflows/azure-windows-ad-auth.yml"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get latest commit hash
id: latest_commit
run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Get commit title
id: commit_title
run: echo "title=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
- name: Set Terraform variables
run: |
sed -i 's/client_id = ""/client_id = "${{ secrets.CLIENT_ID }}"/' templates/azure-windows-ad-auth/main.tf
sed -i 's/subscription_id = ""/subscription_id = "${{ secrets.SUBSCRIPTION_ID }}"/' templates/azure-windows-ad-auth/main.tf
sed -i 's/tenant_id = ""/tenant_id = "${{ secrets.TENANT_ID }}"/' templates/azure-windows-ad-auth/main.tf
- name: Update Coder Template
uses: matifali/update-coder-template@v3
with:
id: azure-windows-ad-auth
dir: templates/azure-windows-ad-auth
url: https://eric-aks.demo.coder.com
name: ${{ steps.latest_commit.outputs.hash }}
message: ${{ steps.commit_title.outputs.title }}
coder_session_token: ${{ secrets.CODER_SESSION_TOKEN }}