Skip to content

Commit

Permalink
Delete tag verification
Browse files Browse the repository at this point in the history
  • Loading branch information
vcerenu committed Sep 12, 2024
1 parent a3c0606 commit 32a86cc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/Puppet_module_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ jobs:

- name: Create environment variables for workflow
run: |
WAZUH_TAG=$(curl --silent https://api.github.com/repos/wazuh/wazuh-puppet/git/refs/tags | grep '["]ref["]:' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 11- | grep ^${{ inputs.BRANCH_NAME }}$)
PUPPET_MODULE_NAME=$(jq .name ${{ github.workspace }}/metadata.json | sed -e 's|["'\'']||g')
PUPPET_MODULE_VERSION=$(jq .version ${{ github.workspace }}/metadata.json | sed -e 's|["'\'']||g')
echo "WAZUH_TAG=$WAZUH_TAG" >> "$GITHUB_ENV"
echo "PUPPET_MODULE_NAME=$PUPPET_MODULE_NAME" >> "$GITHUB_ENV"
echo "PUPPET_MODULE_VERSION=$PUPPET_MODULE_VERSION" >> "$GITHUB_ENV"
Expand All @@ -68,13 +66,13 @@ jobs:
retention-days: 1

- name: Configure aws credentials
if: ${{ env.WAZUH_TAG != '' && inputs.UPLOAD_S3 == true }}
if: ${{ inputs.UPLOAD_S3 == true }}
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.AWS_IAM_PUPPET_ROLE }}
aws-region: "${{ secrets.AWS_REGION }}"

- name: Upload Puppet module to S3
if: ${{ env.WAZUH_TAG != '' && inputs.UPLOAD_S3 == true }}
if: ${{ inputs.UPLOAD_S3 == true }}
run: aws s3 cp ${{ github.workspace }}/output/${{ env.PUPPET_MODULE_NAME }}-${{ env.PUPPET_MODULE_VERSION }}.tar.gz s3://${{ secrets.AWS_S3_BUCKET }}/${{ inputs.S3_REPOSITORY }}/puppet-module/

0 comments on commit 32a86cc

Please sign in to comment.