mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
|
name: Build the AMI Template
|
||
|
on:
|
||
|
workflow_dispatch:
|
||
|
workflow_call:
|
||
|
secrets:
|
||
|
AWS_ACCESS_KEY_ID:
|
||
|
required: true
|
||
|
AWS_SECRET_ACCESS_KEY:
|
||
|
required: true
|
||
|
AWS_DEFAULT_REGION:
|
||
|
required: true
|
||
|
BUCKET_NAME:
|
||
|
required: true
|
||
|
|
||
|
|
||
|
jobs:
|
||
|
build-enclave:
|
||
|
name: "Build the AMI"
|
||
|
runs-on: ubuntu-latest
|
||
|
env:
|
||
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||
|
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
|
||
|
working-directory: images/aws/ec2
|
||
|
steps:
|
||
|
- name: Checkout
|
||
|
id: checkout
|
||
|
uses: actions/checkout@v2
|
||
|
|
||
|
- name: Install AWS CLI
|
||
|
id: prepare
|
||
|
run: sudo apt-get update && sudo apt-get -y install awscli
|
||
|
|
||
|
- name: Download eif
|
||
|
id: download_eif
|
||
|
run: aws s3 cp s3://${{ secrets.BUCKET_NAME }}/eif/ ${{ github.workspace }}/${{ env.working-directory }}/ --recursive --quiet
|
||
|
|
||
|
- name: Download gvproxy
|
||
|
id: download_gvproxy
|
||
|
run: aws s3 cp s3://${{ secrets.BUCKET_NAME }}/gvproxy/gvproxy ${{ github.workspace }}/${{ env.working-directory }}/ --quiet
|
||
|
|
||
|
- name: Install build dependencies
|
||
|
run: sudo apt-get -y install packer
|
||
|
|
||
|
- name: Init packer
|
||
|
run: packer init .
|
||
|
working-directory: ${{ env.working-directory }}
|
||
|
|
||
|
- name: Validate packer
|
||
|
run: packer validate -syntax-only .
|
||
|
working-directory: ${{ env.working-directory }}
|
||
|
|
||
|
- name: Build packer
|
||
|
run: packer build -color=false .
|
||
|
working-directory: ${{ env.working-directory }}
|