Skip to content

Commit

Permalink
Restore upload input and corresponding validations
Browse files Browse the repository at this point in the history
  • Loading branch information
QU3B1M committed Oct 31, 2024
1 parent 77665a1 commit d2d69e0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
description: "Revision"
type: string
default: "0"
upload:
description: "Upload ?"
type: boolean
default: false
is_stage:
description: "Is stage ?"
type: boolean
Expand Down Expand Up @@ -298,27 +302,27 @@ jobs:
if-no-files-found: error

- name: Set up AWS CLI
if: ${{ inputs.upload }}
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.CI_INTERNAL_DEVELOPMENT_BUCKET_USER_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.CI_INTERNAL_DEVELOPMENT_BUCKET_USER_SECRET_KEY }}
aws-region: ${{ secrets.CI_AWS_REGION }}

- name: Upload package to S3
if: ${{ inputs.upload }}
run: |
src="artifacts/dist/${{ steps.package.outputs.name }}"
dest="s3://packages-dev.internal.wazuh.com/development/wazuh/5.x/main/packages/"
aws s3 cp "$src" "$dest"
s3uri="${dest}${{ steps.package.outputs.name }}"
echo "::notice::S3 URI: ${s3uri}"
echo "**Package S3 URI:** ${s3uri}" >> $GITHUB_STEP_SUMMARY
- name: Upload checksum to S3sha512
- name: Upload checksum to S3
if: ${{ inputs.upload && inputs.checksum }}
run: |
src="artifacts/dist/${{ steps.package.outputs.name }}.sha512"
dest="s3://packages-dev.internal.wazuh.com/development/wazuh/5.x/main/packages/"
aws s3 cp "$src" "$dest"
s3uri="${dest}${{ steps.package.outputs.name }}.sha512"
echo "::notice::S3 sha512 URI: ${s3uri}"
echo "**Package checksum S3 URI:** ${s3uri}" >> $GITHUB_STEP_SUMMARY

0 comments on commit d2d69e0

Please sign in to comment.