-
Notifications
You must be signed in to change notification settings - Fork 6
57 lines (46 loc) · 1.85 KB
/
azure.ubuntu.20_04.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Build Ubuntu 20.04 VM Image on Azure
on:
- workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Copy init.sh
uses: canastro/copy-file-action@master
with:
source: "scripts/init.sh"
target: "packer/azure/ubuntu/20_04/init.sh"
- name: Copy inventory.sh
uses: canastro/copy-file-action@master
with:
source: "scripts/inventory.sh"
target: "packer/azure/ubuntu/20_04/inventory.sh"
- name: Copy kind-load-cafile.sh
uses: canastro/copy-file-action@master
with:
source: "scripts/kind-load-cafile.sh"
target: "packer/azure/ubuntu/20_04/kind-load-cafile.sh"
- name: Copy fetch-tanzu-cli.sh
uses: canastro/copy-file-action@master
with:
source: "scripts/fetch-tanzu-cli.sh"
target: "packer/azure/ubuntu/20_04/fetch-tanzu-cli.sh"
- name: Copy fetch-and-install-oci-cli.sh
uses: canastro/copy-file-action@master
with:
source: "scripts/fetch-and-install-oci-cli.sh"
target: "packer/azure/ubuntu/20_04/fetch-and-install-oci-cli.sh"
- name: Use latest Packer
uses: hashicorp-contrib/setup-packer@v1
with:
packer-version: 1.7.8
- name: Initialize Packer
working-directory: ./packer/azure/ubuntu/20_04
run: packer init arm-ci.pkr.hcl
- name: Build image from template
working-directory: ./packer/azure/ubuntu/20_04
run: packer build -var subscription_id="${{ secrets.SUBSCRIPTION_ID }}" -var tenant_id="${{ secrets.TENANT_ID }}" -var client_id="${{ secrets.CLIENT_ID }}" -var client_secret="${{ secrets.CLIENT_SECRET }}" -only='standard.*' arm-ci.pkr.hcl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}