Skip to content

Commit

Permalink
Merge pull request #1119 from wazuh/enhancement/5649-checksum-file
Browse files Browse the repository at this point in the history
Add checksum file creation and upload
  • Loading branch information
teddytpc1 committed Sep 20, 2024
2 parents b880f9f + 618df92 commit c9ba34f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/Puppet_module_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,27 @@ jobs:
PUPPET_MODULE_NAME=${{ env.PUPPET_MODULE_REPO }}-${{ env.PUPPET_MODULE_VERSION }}.tar.gz
echo "PUPPET_MODULE_NAME=$PUPPET_MODULE_NAME" >> "$GITHUB_ENV"
- name: Build Wazuh Puppet module checksum
if: ${{ inputs.checksum == true }}
run: |
sha512sum ${{ github.workspace }}/output/${{ env.PUPPET_MODULE_NAME }} > ${{ github.workspace }}/output/${{ env.PUPPET_MODULE_NAME }}.sha512
- name: Create Puppet module artifact
uses: actions/upload-artifact@v4
with:
name: Puppet module artifact
path: ${{ github.workspace }}/output/${{ env.PUPPET_MODULE_NAME }}
retention-days: 1

- name: Create Puppet module checksum artifact
if: ${{ inputs.checksum == true }}
uses: actions/upload-artifact@v4
with:
name: Puppet module checksum artifact
path: ${{ github.workspace }}/output/${{ env.PUPPET_MODULE_NAME }}.sha512
retention-days: 1

- name: Configure aws credentials
if: ${{ inputs.upload == true }}
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -105,3 +119,8 @@ jobs:
if: ${{ inputs.upload == true }}
run: aws s3 cp ${{ github.workspace }}/output/${{ env.PUPPET_MODULE_NAME }} s3://${{ secrets.AWS_S3_BUCKET }}/${{ env.S3_PATH }}

- name: Create checksum file and upload
if: ${{ inputs.checksum == true && inputs.upload == true }}
run: |
aws s3 cp ${{ github.workspace }}/output/${{ env.PUPPET_MODULE_NAME }}.sha512 s3://${{ secrets.AWS_S3_BUCKET }}/${{ env.S3_PATH }}

0 comments on commit c9ba34f

Please sign in to comment.