Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add checksum file creation and upload #1119

Merged
merged 4 commits into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}

Loading