added template #7
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: Packer Build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
packer: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Packer | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y unzip | |
curl -fsSL -o packer.zip https://releases.hashicorp.com/packer/1.8.4/packer_1.8.4_linux_amd64.zip | |
unzip packer.zip | |
sudo mv packer /usr/local/bin/ | |
packer --version | |
- name: Run Packer Build | |
run: | | |
packer init aws-ubuntu.pkr.hcl | |
packer validate aws-ubuntu.pkr.hcl | |
packer build aws-ubuntu.pkr.hcl |