-
Notifications
You must be signed in to change notification settings - Fork 6
60 lines (48 loc) · 1.75 KB
/
aws.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
58
59
60
name: Build Ubuntu 20.04 VM Image on AWS
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/aws/ubuntu/20_04/init.sh"
- name: Copy inventory.sh
uses: canastro/copy-file-action@master
with:
source: "scripts/inventory.sh"
target: "packer/aws/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/aws/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/aws/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/aws/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/aws/ubuntu/20_04
run: packer init .
- name: Build image from template
working-directory: ./packer/aws/ubuntu/20_04
run: packer build -only=standard.* .
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}