-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (52 loc) · 1.51 KB
/
Copy pathpacker.yml
File metadata and controls
64 lines (52 loc) · 1.51 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
name: packer
on:
push:
env:
PRODUCT_VERSION: "latest"
VAULT_SKIP_VERIFY: "true"
AWS_DEFAULT_REGION: "ap-southeast-1"
jobs:
packer:
runs-on: ubuntu-latest
name: Run Packer
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Import Secrets
id: import-secrets
uses: hashicorp/vault-action@v2.7.3
with:
url: ${{ vars.VAULT_ADDR }}
tlsSkipVerify: ${{ env.VAULT_SKIP_VERIFY}}
token: ${{ secrets.VAULT_TOKEN }}
secrets: |
aws/creds/packer access_key | AWS_ACCESS_KEY_ID ;
aws/creds/packer secret_key | AWS_SECRET_ACCESS_KEY
- name: Setup `Python 3.9`
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies including Ansible
run: |
python -m pip install --upgrade pip ;
pip install ansible ;
- name: Checkout Playbook
uses: actions/checkout@v3
id: harden
with:
repository: "devops-nick/cis-security"
path: "cis-security"
- name: Setup `packer`
uses: hashicorp/setup-packer@main
id: setup
with:
version: ${{ env.PRODUCT_VERSION }}
- name: Run `packer init`
id: init
run: "packer init ."
- name: Run `packer validate`
id: validate
run: "packer validate ."
- name: Run `packer build`
id: build
run: "packer build ."