Skip to content

Format files

Format files #47

Workflow file for this run

name: Build packages
# This workflow runs when any of the following occur:
# - Run manually
on:
push:
# Sequence of patterns matched against refs/heads
branches:
- 'ci/*'
workflow_dispatch:
inputs:
revision:
description: "Any string or number used to extend the package's identifier"
type: string
required: true
default: "1"
# ==========================
# Bibliography
# ==========================
#
# * Reusable workflows: limitations
# | https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations
# * Using matrix in reusable workflows:
# | https://docs.github.com/en/actions/using-workflows/reusing-workflows#using-a-matrix-strategy-with-a-reusable-workflow
# * Reading input from the called workflow
# | https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_callinputs
# * Ternary operator
# | https://docs.github.com/en/actions/learn-github-actions/expressions#example
jobs:
version:
uses: ./.github/workflows/r_version.yml
commit_sha:
uses: ./.github/workflows/r_commit_sha.yml
build:
needs: [ version, commit_sha ]
strategy:
matrix:
distribution: [tar, rpm, deb]
architecture: [x64, arm64]
uses: ./.github/workflows/r_build.yml
with:
architecture: ${{ matrix.architecture }}
distribution: ${{ matrix.distribution }}
revision: ${{ github.event_name == 'push' && '1' || inputs.revision }}
name: wazuh-indexer-min_${{ needs.version.outputs.version }}-${{ github.event_name == 'push' && '1' || inputs.revision }}-${{ matrix.architecture }}_${{ needs.commit_sha.outputs.commit_sha }}.${{ matrix.distribution }}
assemble:
needs: [version, commit_sha, build]
strategy:
matrix:
distribution: [tar, rpm, deb]
architecture: [x64, arm64]
exclude:
# skip arm64 until we have arm runners
- architecture: arm64
- distribution: tar
uses: ./.github/workflows/r_assemble.yml
with:
architecture: ${{ matrix.architecture }}
distribution: ${{ matrix.distribution }}
min: wazuh-indexer-min_${{ needs.version.outputs.version }}-${{ github.event_name == 'push' && '1' || inputs.revision }}-${{ matrix.architecture }}_${{ needs.commit_sha.outputs.commit_sha }}.${{ matrix.distribution }}