2023-01-10 15:03:40 +01:00
|
|
|
name: "deb-package"
|
|
|
|
description: "Package DEB Centreon"
|
|
|
|
inputs:
|
|
|
|
distrib:
|
|
|
|
description: "The distribution used for packaging"
|
|
|
|
required: true
|
|
|
|
artifactory_username:
|
|
|
|
description: The artifactory username
|
|
|
|
required: true
|
|
|
|
artifactory_password:
|
|
|
|
description: The artifactory password
|
|
|
|
required: true
|
|
|
|
version:
|
|
|
|
description: "Centreon packaged version"
|
|
|
|
required: true
|
|
|
|
release:
|
|
|
|
description: The release number
|
|
|
|
required: true
|
|
|
|
cache_key:
|
|
|
|
description: "The cached package key"
|
|
|
|
required: true
|
|
|
|
stability:
|
|
|
|
description: "The package stability (stable, testing, unstable)"
|
|
|
|
required: true
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
|
|
|
- name: Use cache DEB files
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ./*.deb
|
|
|
|
key: ${{ inputs.cache_key }}
|
|
|
|
|
|
|
|
- name: Publish DEBS to Nexus
|
|
|
|
run: |
|
2023-01-17 11:47:42 +01:00
|
|
|
for MAJOR in "22.04" "22.10"; do
|
|
|
|
echo "Delivering to $MAJOR ${{ inputs.stability }}"
|
2023-01-10 15:03:40 +01:00
|
|
|
|
2023-01-17 11:47:42 +01:00
|
|
|
FOLDER_SUFFIX="-${{ inputs.stability }}"
|
|
|
|
if [[ "${{ inputs.stability }}" == "stable" ]]; then
|
|
|
|
FOLDER_SUFFIX=""
|
|
|
|
fi
|
2023-01-10 15:03:40 +01:00
|
|
|
|
2023-01-17 11:47:42 +01:00
|
|
|
find -name "*.deb" -print0 | xargs -0 -t -I % -P 2 curl -u "${{ inputs.artifactory_username }}":"${{ inputs.artifactory_password }}" -H "Content-Type: multipart/form-data" --data-binary "@%" https://apt.centreon.com/repository/$MAJOR$FOLDER_SUFFIX/
|
|
|
|
done
|
2023-01-10 15:03:40 +01:00
|
|
|
shell: bash
|