Skip to content

Commit

Permalink
Fix name and BRANCH_NAME parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
vcerenu committed Sep 11, 2024
1 parent b542da0 commit 06d8ec1
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/Puppet_module_builder.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
run-name: Build Wazuh Puppet module ${{ inputs.WAZUH_VERSION }}
run-name: Build Wazuh Puppet module ${{ inputs.BRANCH_NAME }}
name: Puppet Module Builder

on:
workflow_dispatch:
inputs:
WAZUH_VERSION:
description: "Wazuh Version"
BRANCH_NAME:
type: string
description: "Branch or tag name"
required: true
default: v4.10.0
default: "v4.10.0"
UPLOAD_S3:
type: choice
description: "Upload Puppet module to S3"
Expand All @@ -32,10 +33,12 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.BRANCH_NAME }}

- name:
- name: Verify Tag name
run: |
WAZUH_TAG=$(curl --silent https://api.github.com/repos/wazuh/wazuh/git/refs/tags | grep '["]ref["]:' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 11- | grep ^v${{ inputs.WAZUH_VERSION }}$)
WAZUH_TAG=$(curl --silent https://api.github.com/repos/wazuh/wazuh/git/refs/tags | grep '["]ref["]:' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 11- | grep ^${{ inputs.BRANCH_NAME }}$)
echo "WAZUH_TAG=$WAZUH_TAG" >> "$GITHUB_ENV"
- name: Install dependencies
Expand Down

0 comments on commit 06d8ec1

Please sign in to comment.