-
Notifications
You must be signed in to change notification settings - Fork 15
53 lines (50 loc) · 1.51 KB
/
packer.yaml
File metadata and controls
53 lines (50 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
name: Build packer AMI
on:
push:
tags:
- "unleash-edge-v*"
workflow_dispatch:
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: read
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v6
with:
aws-region: eu-north-1
role-to-assume: arn:aws:iam::726824350591:role/unleash-github-actions-packer
role-session-name: gha-packer-session
- name: Install Packer
uses: hashicorp/setup-packer@v3
with:
version: "1.14.3"
- name: Cache packer plugins
uses: actions/cache@v5
with:
path: ~/.config/packer/plugins
key: packer-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.pkr.hcl') }}
- name: Packer Init
working-directory: packer
run: packer init .
- name: Packer Validate
working-directory: packer
run: |
packer validate -var "edge_version=${{ github.ref_name }}" .
- name: Build AMI
id: build
working-directory: packer
run: |
packer build -var "edge_version=${{ github.ref_name }}" .
- name: Upload manifest
uses: actions/upload-artifact@v7
with:
name: manifest-${{ github.ref_name }}
path: packer/unleash-edge-enterprise-arm64-ami-manifest.json