Skip to content

Build packages (on demand) #28

Build packages (on demand)

Build packages (on demand) #28

Workflow file for this run

name: Build packages
# This workflow runs when any of the following occur:
# - Run manually
on:
workflow_dispatch:
inputs:
revision:
# description:
default: "1"
required: false
type: string
# ==========================
# 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
jobs:
version:
uses: ./.github/workflows/r_version.yml
build:
needs: version
strategy:
matrix:
distribution: [tar, rpm, deb]
architecture: [x64, arm64]
uses: ./.github/workflows/r_build.yml
with:
architecture: ${{ matrix.architecture }}
distribution: ${{ matrix.distribution }}
revision: ${{ inputs.revision }}
name: wazuh-indexer-min_${{ needs.version.outputs.version }}-${{ inputs.revision }}-${{ matrix.architecture }}_${{ github.sha }}.${{ matrix.distribution }}
# wazuh-indexer-min_4.8.0-rc1_x64_ff98475f.deb
# TODO arm64 != amd64 (deb), x64 != x86_64 (rpm)
# TODO use short SHA https://stackoverflow.com/a/59819441/13918537
assemble:
needs: [version, 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 }}-${{ inputs.revision }}-${{ matrix.architecture }}_${{ github.sha }}.${{ matrix.distribution }}