chore: add seed job for helm charts #26
Workflow file for this run
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
--- | |
# This workflow will validate the Packer AMI templates created using the | |
# Hashicorp Configuration Language (HCL2) | |
name: Packer AMI template validation | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [master] | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
environment: ${{ vars.ENVIRONMENT }} | |
name: Validate packer template for the custom AMI | |
steps: | |
- name: Checkout code from branch | |
uses: actions/checkout@v3 | |
- name: Create & configure Packer variables | |
run: | | |
touch ami.pkrvars.hcl | |
echo ami_prefix=\"${{ vars.AMI_PREFIX }}\" >> ami.pkrvars.hcl | |
echo OS=\"${{ vars.OS }}\" >> ami.pkrvars.hcl | |
echo ubuntu_version=\"${{ vars.UBUNTU_VERSION }}\" >> ami.pkrvars.hcl | |
echo ssh_username=\"${{ vars.SSH_USERNAME }}\" >> ami.pkrvars.hcl | |
echo subnet_id=\"${{ secrets.SUBNET_ID }}\" >> ami.pkrvars.hcl | |
echo source_ami=\"${{ vars.SOURCE_AMI }}\" >> ami.pkrvars.hcl | |
echo aws_region=\"${{ vars.AWS_REGION }}\" >> ami.pkrvars.hcl | |
echo instance_type=\"${{ vars.INSTANCE_TYPE}}\" >> ami.pkrvars.hcl | |
echo volume_size=\"${{ vars.VOLUME_SIZE}}\" >> ami.pkrvars.hcl | |
echo volume_type=\"${{ vars.VOLUME_TYPE}}\" >> ami.pkrvars.hcl | |
echo device_name=\"${{ vars.DEVICE_NAME}}\" >> ami.pkrvars.hcl | |
- name: Setup `packer` | |
uses: hashicorp/setup-packer@main | |
id: setup | |
with: | |
version: "latest" | |
- name: Packer format | |
id: fmt | |
run: "packer fmt ." | |
- name: Packer init | |
id: init | |
run: "packer init ubuntu.ami.pkr.hcl" | |
- name: Validate packer template | |
id: validate | |
run: "packer validate -evaluate-datasources \ | |
-var 'ami_users=${{ secrets.AMI_USERS }}' \ | |
--var-file=ami.pkrvars.hcl ubuntu.ami.pkr.hcl" |