Skip to content

Commit

Permalink
Added checksum logic
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcr01 committed Sep 24, 2024
1 parent 8196902 commit 9153427
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/builder_OVA.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
run-name: Build OVA ${{ inputs.is_stage && ' - is stage' || '' }} ${{ inputs.id }} - Wazuh virtual machines branch ${{ github.ref_name }} - Launched by @${{ github.actor }}
run-name: Build OVA ${{ inputs.is_stage && ' - is stage' || '' }}${{ inputs.checksum && ' - checksum' || '' }} ${{ inputs.id }} - Wazuh virtual machines branch ${{ github.ref_name }} - Launched by @${{ github.actor }}
name: Build OVA

on:
Expand Down Expand Up @@ -29,6 +29,12 @@ on:
description: "Is stage?"
type: boolean
default: false
checksum:
type: boolean
description: |
Generate package checksum.
Default is 'false'.
required: false
DEBUG:
type: choice
description: 'Debug mode'
Expand All @@ -42,6 +48,9 @@ on:
id:
type: string
required: false
checksum:
type: boolean
required: false

env:
OVA_AMI: "ami-0d4bd55523ee67aa4"
Expand Down Expand Up @@ -222,6 +231,7 @@ jobs:
aws s3 cp --quiet --acl public-read /tmp/${{ env.FILENAME_OVA }} s3://${{ secrets.AWS_S3_BUCKET }}/${{ env.S3_PATH }}/${{ env.FILENAME_OVA }}
- name: Generating sha512 file
if: ${{ inputs.checksum == true }}
run: |
sha512sum /tmp/${{ env.FILENAME_OVA }} > /tmp/${{ env.FILENAME_SHA }}
aws s3 cp --quiet --acl public-read /tmp/${{ env.FILENAME_SHA }} s3://${{ secrets.AWS_S3_BUCKET }}/${{ env.S3_PATH }}/${{ env.FILENAME_SHA }}
Expand Down

0 comments on commit 9153427

Please sign in to comment.