mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-26 16:09:45 -05:00
2d8fcd9bf4
Co-authored-by: Malte Poll <mp@edgeless.systems> Co-authored-by: katexochen <katexochen@users.noreply.github.com> Co-authored-by: Daniel Weiße <dw@edgeless.systems> Co-authored-by: Thomas Tendyck <tt@edgeless.systems> Co-authored-by: Benedict Schlueter <bs@edgeless.systems> Co-authored-by: leongross <leon.gross@rub.de> Co-authored-by: Moritz Eckert <m1gh7ym0@gmail.com>
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 }}
|