-
Notifications
You must be signed in to change notification settings - Fork 14
31 lines (29 loc) · 1.16 KB
/
main.yml
File metadata and controls
31 lines (29 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Build image
on:
push:
branches: [ '*' ]
pull_request:
branches: [ master ]
release:
types: [ created ]
workflow_dispatch:
jobs:
build:
runs-on: macos-12 # Using macOS as https://github.com/actions/virtual-environments/issues/183
steps:
- uses: actions/checkout@v2
- name: Download base image
run: |
mkdir output-virtualbox-iso
wget --progress=dot:giga https://clovervm.ams3.digitaloceanspaces.com/base-focal.ova -O output-virtualbox-iso/clover-devel.ova
- name: Build
run: ./build.sh
- name: Image size
run: ls -lh output-virtualbox-ovf
- name: Upload
if: ${{ github.event_name == 'release' }}
# Not using ready S3 actions, because they either don't run on macOS machines or don't support changing the endpoint
run: |
AWS_ACCESS_KEY_ID=${{secrets.S3_KEY}} AWS_SECRET_ACCESS_KEY=${{secrets.S3_SECRET_KEY}} aws s3 sync . s3://clovervm/ --acl public-read --endpoint-url https://ams3.digitaloceanspaces.com --no-progress
echo Uploaded https://clovervm.ams3.digitaloceanspaces.com/$(ls)
working-directory: output-virtualbox-ovf