-
Notifications
You must be signed in to change notification settings - Fork 50
66 lines (55 loc) · 1.34 KB
/
create-ami.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
61
62
63
64
65
66
name: Build AMI with Packer
on:
push:
branches:
- main
# pull_request:
# branches:
# - '*'
workflow_dispatch:
jobs:
build-ami:
runs-on: [isucon13-ci-packer]
name: Build
strategy:
matrix:
go:
- 1.21.1
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install unzip
run: |
sudo apt-get update
sudo apt-get install unzip
- name: Set up Packer
uses: hashicorp/setup-packer@main
with:
version: "1.9.4"
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
id: go
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup corepack
run: corepack enable yarn
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install Ansible
run: |
python -m pip install --upgrade pip
pip install ansible
- name: Build
run: |
cd provisioning/packer
make
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ap-northeast-1