Skip to content

Commit

Permalink
ENH: Validate and upload artifact from build
Browse files Browse the repository at this point in the history
Validates the qemu image then creates artifacts from the Github Actions
including the SHA256 (which OpenStack can use as part of the image
upload) as artifacts that stay around for ~1 week
  • Loading branch information
DavidFair committed Nov 12, 2024
1 parent 4aef55f commit e11313e
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/amphora_builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Exec Amphora build
run: cd amphora-image-builder && ./build.sh
run: |
cd $GITHUB_WORKSPACE/amphora-image-builder
./build.sh
sudo chown -R $USER:$USER $GITHUB_WORKSPACE/output
- name: Check image is valid
run: |
cd $GITHUB_WORKSPACE
sudo apt-get update && sudo apt-get install -y --no-install-recommends qemu-utils
qemu-img check output/amphora-x64-$(date +%Y-%m-%d)-haproxy.qcow2
- name: SHA256 image
run: |
cd $GITHUB_WORKSPACE
sha256sum output/amphora-x64-$(date +%Y-%m-%d)-haproxy.qcow2 > output/amphora-x64-$(date +%Y-%m-%d)-haproxy.qcow2.sha256
- name: Upload image
uses: actions/upload-artifact@v4
with:
name: amphora-image
if-no-files-found: error
path: output/*qcow2*
compression-level: 0 # qcow2 files are already compressed
retention-days: 7

0 comments on commit e11313e

Please sign in to comment.