Skip to content

Commit

Permalink
CL:
Browse files Browse the repository at this point in the history
- testing checkout
  • Loading branch information
sebasfalcone committed Apr 12, 2024
1 parent f42962f commit 124021c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 107 deletions.
61 changes: 0 additions & 61 deletions .github/workflows/diffs.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/groups.yml

This file was deleted.

66 changes: 36 additions & 30 deletions .github/workflows/inputs.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,47 @@
name: Checkout testing

on:
push:

workflow_dispatch:
inputs:
daemon_debug:
description: 'Enable or disable the AP daemon debug'
required: true
type: choice
default: "ON"
options:
- "ON"
- "OFF"

daemon_port:
description: 'Port for the AP daemon'
required: true
type: string
default: "5000"

execution_period:
description: 'Execution period for the AP full pipeline'
wazuh_version:
description: 'Identifier of the generated content. The generated file will be named vd_1.0.0_vd_<wazuh_version>.tar.xz'
required: true
type: string
default: "6h"

jobs:
log-the-inputs:
checkout_testing:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
# Idenentifiers of the generated content. The generated files will be named vd_1.0.0_vd_<wazuh_version>.tar.xz
wazuh_version: ["testing", "testing2"]

steps:
- name: print
env:
DEBUG: ${{ inputs.daemon_debug }}
PORT: ${{ inputs.daemon_port }}
PERIOD: ${{ inputs.execution_period }}
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

# Checkout to the tag
# If the tag does not exist, checkout to the branch
# If the branch does not exist, exit with an error
- name: Checkout to wazuh_version
run: |
echo "Debug: ${DEBUG}"
echo "Port: ${PORT}"
echo "Period: ${PERIOD}"
if git show-ref --tags --verify --quiet "refs/tags/v${{ matrix.wazuh_version }}"; then
git checkout "tags/v${{ matrix.wazuh_version }}"
else
echo "Warning: Unable to find tag v${{ matrix.wazuh_version }}"
echo "Debug: ${{ inputs.daemon_debug }}"
echo "Port: ${{ inputs.daemon_port }}"
echo "Period: ${{ inputs.execution_period }}"
if git show-ref --verify --quiet "refs/heads/${{ matrix.wazuh_version }}"; then
git checkout "origin/${{ matrix.wazuh_version }}"
else
echo "Error: Unable to find branch ${{ matrix.wazuh_version }}"
exit 1
fi
fi

0 comments on commit 124021c

Please sign in to comment.