93 lines
2.6 KiB
YAML
93 lines
2.6 KiB
YAML
on:
|
|
workflow_call:
|
|
inputs:
|
|
plugins:
|
|
required: true
|
|
type: string
|
|
version:
|
|
required: true
|
|
type: string
|
|
release:
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
registry_username:
|
|
required: true
|
|
registry_password:
|
|
required: true
|
|
|
|
jobs:
|
|
fatpacker:
|
|
runs-on: ubuntu-22.04
|
|
outputs:
|
|
version: ${{ steps.get_version.outputs.version }}
|
|
release: ${{ steps.get_version.outputs.release }}
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Prepare FatPacker
|
|
uses: perl-actions/install-with-cpm@stable
|
|
with:
|
|
install: |
|
|
App::FatPacker
|
|
File::Copy::Recursive
|
|
JSON
|
|
|
|
- name: Run FatPacker
|
|
run: |
|
|
COMMIT=$(git log -1 HEAD --pretty=format:%h)
|
|
perl .github/scripts/plugins-source.container.pl "${{ inputs.plugins }}" "${{ steps.get_version.outputs.version }} ($COMMIT)"
|
|
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: ./build/
|
|
key: fatpacked-plugins-${{ github.sha }}-${{ github.run_id }}
|
|
|
|
package:
|
|
runs-on: ubuntu-22.04
|
|
needs: [fatpacker]
|
|
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- package_extension: rpm
|
|
image: packaging-plugins-centos7
|
|
distrib: el7
|
|
- package_extension: rpm
|
|
image: packaging-plugins-alma8
|
|
distrib: el8
|
|
- package_extension: rpm
|
|
image: packaging-plugins-alma9
|
|
distrib: el9
|
|
- package_extension: deb
|
|
image: packaging-plugins-bullseye
|
|
distrib: bullseye
|
|
name: "package ${{ matrix.distrib }}"
|
|
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: ./build/
|
|
key: fatpacked-plugins-${{ github.sha }}-${{ github.run_id }}
|
|
|
|
- uses: ./.github/actions/package
|
|
with:
|
|
package_extension: ${{ matrix.package_extension }}
|
|
distrib: ${{ matrix.distrib }}
|
|
image_name: ${{ matrix.image }}
|
|
script_name: plugin-packaging-${{ matrix.package_extension }}
|
|
plugins: ${{ inputs.plugins }}
|
|
version: ${{ inputs.version }}
|
|
release: ${{ inputs.release }}
|
|
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }}
|
|
sign: true
|
|
registry_url: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}
|
|
registry_username: ${{ secrets.registry_username }}
|
|
registry_password: ${{ secrets.registry_password }}
|