name: "deb-delivery" description: "Deliver DEB packages" inputs: module_name: description: "The package module name" required: true distrib: description: "The distribution used for packaging" required: true cache_key: description: "The cached package key" required: true stability: description: "The package stability (stable, testing, unstable)" required: true artifactory_token: description: "token for artifactory" required: true runs: using: "composite" steps: - name: Remove previously delivered DEBs run: rm -f ./*.deb shell: bash - name: Use cache DEB files uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ./*.deb key: ${{ inputs.cache_key }} fail-on-cache-miss: true - uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1 env: JF_URL: https://centreon.jfrog.io JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }} - name: Publish DEBs to artifactory run: | FILES="*.deb" for FILE in $FILES; do echo "[DEBUG] - File: $FILE" ARCH=$(echo $FILE | cut -d '_' -f3 | cut -d '.' -f1) jf rt upload "$FILE" "test-apt-plugins-${{ inputs.stability }}/pool/${{ inputs.module_name }}/" --deb "${{ inputs.distrib }}/main/$ARCH" done shell: bash