Skip to content

Commit 2834f08

Browse files
authored
Update and rename build-comparison.yml to VM.yml
1 parent 4f84937 commit 2834f08

File tree

2 files changed

+47
-327
lines changed

2 files changed

+47
-327
lines changed

.github/workflows/VM.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build and Deploy VM Image
2+
3+
env:
4+
AWS_REGION: us-east-1 # Replace with your desired AWS region
5+
6+
on:
7+
workflow_dispatch:
8+
9+
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: '3.8'
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
28+
29+
- name: Configure AWS credentials
30+
uses: aws-actions/configure-aws-credentials@v4
31+
with:
32+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
33+
aws-secret-access-key: ${{ secrets.AWS_SECRET }}
34+
aws-region: ${{ env.AWS_REGION }}
35+
36+
- name: Build VM image
37+
run: |
38+
packer fmt -check .
39+
packer init .
40+
packer validate .
41+
packer build -debug .
42+
43+
- name: Deploy VM image
44+
run: |
45+
# Deploy the VM image to your cloud provider
46+
# Example for AWS using AWS CLI
47+
aws ec2 describe-images --filters "Name=name,Values=my-vm-image"

.github/workflows/build-comparison.yml

Lines changed: 0 additions & 327 deletions
This file was deleted.

0 commit comments

Comments
 (0)