-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
31 additions
and
108 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
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", "invalid branch"] | ||
|
||
steps: | ||
- name: print | ||
env: | ||
DEBUG: ${{ inputs.daemon_debug }} | ||
PORT: ${{ inputs.daemon_port }} | ||
PERIOD: ${{ inputs.execution_period }} | ||
run: | | ||
echo "Debug: ${DEBUG}" | ||
echo "Port: ${PORT}" | ||
echo "Period: ${PERIOD}" | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
ref: ${{ matrix.wazuh_version }} | ||
|
||
echo "Debug: ${{ inputs.daemon_debug }}" | ||
echo "Port: ${{ inputs.daemon_port }}" | ||
echo "Period: ${{ inputs.execution_period }}" | ||
# 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: | | ||
if git show-ref --tags --verify --quiet "refs/tags/v${{ matrix.wazuh_version }}"; then | ||
git checkout --quiet "tags/v${{ matrix.wazuh_version }}" | ||
else | ||
echo "Warning: Unable to find tag v${{ matrix.wazuh_version }}. Continuing with branch ${{ matrix.wazuh_version }}" | ||
fi |