update deploy-democluster.sh to use latest #1
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
name: 'Build and Publish democluster to s3' | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-image-in-lxd: | |
name: build-image-in-lxd | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Setup lxd controller | |
uses: charmed-kubernetes/actions-operator@main | |
with: | |
provider: lxd | |
- name: Setup poetry | |
- uses: Gr1N/setup-poetry@v8 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
architecture: "x64" | |
- name: Install image-factory | |
run: | | |
poetry env use "3.11" | |
poetry install | |
- name: Build democluster image | |
run: | | |
poetry run image-factory build | |
- name: Upload democluster image to s3 | |
- uses: jakejarvis/s3-sync-action@master | |
with: | |
args: --acl public-read --follow-symlinks --delete | |
env: | |
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: 'us-west-2' # optional: defaults to us-east-1 | |
SOURCE_DIR: 'democluster.img' # optional: defaults to entire repository | |
DEST_DIR: "cloud-images/democluster/latest" |