Skip to content

Merge pull request #8 from omnivector-solutions/jonathan/PENG-2112--a… #36

Merge pull request #8 from omnivector-solutions/jonathan/PENG-2112--a…

Merge pull request #8 from omnivector-solutions/jonathan/PENG-2112--a… #36

name: "Build and Publish democluster to s3"
on:
push:
branches:
- main
workflow_dispatch:
inputs:
jobbergate_version:
description: The Jobbergate agent version
required: false
type: string
default: 4.3.1
jobs:
build-image-in-lxd:
name: build-image-in-lxd
runs-on: self-hosted
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Install image-factory
run: |
poetry env use "3.12"
poetry install
- name: Build democluster
env:
JG_VERSION: ${{ github.event.inputs.jobbergate_version }}
run: |
poetry run image-factory build democluster
- name: Sync democluster image to S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
run: |
aws s3 sync democluster/final \
s3://omnivector-public-assets/cloud-images/democluster/latest \
--acl public-read --follow-symlinks --delete 1> /dev/null