Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Build workflow to run on push events #134

Merged
merged 5 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ name: Build packages
# This workflow runs when any of the following occur:
# - Run manually
on:
pull_request:
push:
# Sequence of patterns matched against refs/heads
branches:
- 'ci/*'
workflow_dispatch:
inputs:
revision:
# description:
default: "1"
required: false
description: "Any string or number used to extend the package's identifier"
type: string
required: true
default: "1"

# ==========================
# Bibliography
Expand All @@ -25,6 +25,8 @@ on:
# | 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:
Expand All @@ -43,8 +45,8 @@ jobs:
with:
architecture: ${{ matrix.architecture }}
distribution: ${{ matrix.distribution }}
revision: ${{ inputs.revision }}
name: wazuh-indexer-min_${{ needs.version.outputs.version }}-${{ inputs.revision }}-${{ matrix.architecture }}_${{ needs.commit_sha.outputs.commit_sha }}.${{ 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]
Expand All @@ -61,4 +63,4 @@ jobs:
with:
architecture: ${{ matrix.architecture }}
distribution: ${{ matrix.distribution }}
min: wazuh-indexer-min_${{ needs.version.outputs.version }}-${{ inputs.revision }}-${{ matrix.architecture }}_${{ needs.commit_sha.outputs.commit_sha }}.${{ 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 }}
10 changes: 5 additions & 5 deletions .github/workflows/r_assemble.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ on:
workflow_call:
inputs:
distribution:
description: 'One of [ "tar", "rpm", "deb" ]'
description: "One of [ 'tar', 'rpm', 'deb' ]"
default: "rpm"
required: false
required: true
type: string
architecture:
description: 'One of [ "x64", "arm64" ]'
description: "One of [ 'x64', 'arm64' ]"
default: "x64"
required: false
required: true
type: string
min:
description: The name of the package to download.
description: "The name of the package to download."
required: true
type: string

Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/r_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,22 @@ on:
workflow_call:
inputs:
distribution:
description: 'One of [ "tar", "rpm", "deb" ]'
description: "One of [ 'tar', 'rpm', 'deb' ]"
default: "rpm"
required: false
required: true
type: string
architecture:
description: 'One of [ "x64", "arm64" ]'
description: "One of [ 'x64', 'arm64' ]"
default: "x64"
required: false
required: true
type: string
revision:
description: "Any string or number used to extend the package's identifier."
type: string
required: true
default: "1"
name:
description: The name of the package to upload.
description: "The name of the package to upload."
required: true
type: string

Expand Down