Merge pull request #422 from isucon/remove-aws-key #133
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |