enh(stream-connectors-lib): package lua-sql-mysql for el8 and el9 #7
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: lua-sql-mysql | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - dependencies/lua-sql-mysql/** | |
| push: | |
| branches: | |
| - develop | |
| - master | |
| paths: | |
| - dependencies/lua-sql-mysql/** | |
| jobs: | |
| get-environment: | |
| uses: ./.github/workflows/get-environment.yml | |
| package: | |
| needs: [get-environment] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| distrib: [el8, el9] | |
| include: | |
| - image: packaging-stream-connectors-nfpm-alma8 | |
| distrib: el8 | |
| lua_version: 5.3 | |
| - image: packaging-stream-connectors-nfpm-alma9 | |
| distrib: el9 | |
| lua_version: 5.4 | |
| runs-on: ubuntu-24.04 | |
| container: | |
| image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest | |
| credentials: | |
| username: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }} | |
| password: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }} | |
| name: package ${{ matrix.distrib }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Checkout luasql sources | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| repository: "lunarmodules/luasql" | |
| path: "lua-sql-src" | |
| ref: "2.6.0" | |
| - name: Prepare packaging of lua-sql-mysql | |
| run: | | |
| dnf install -y dnf-plugins-core | |
| if [ "${{ matrix.distrib }}" == "el8" ]; then | |
| dnf config-manager --set-enabled powertools | |
| else | |
| dnf config-manager --set-enabled crb | |
| fi | |
| dnf install -y make gcc lua lua-devel mysql mysql-devel | |
| cd lua-sql-src | |
| make mysql DRIVER_LIBS_mysql="-L/usr/lib64/mysql -lmysqlclient" DRIVER_INCS_mysql=-I/usr/include/mysql LUA_SYS_VER=${{ matrix.lua_version }} | |
| cd .. | |
| sed -i "s/@luaver@/${{ matrix.lua_version }}/g" dependencies/lua-sql-mysql/packaging/lua-sql-mysql.yaml | |
| shell: bash | |
| - name: Package | |
| uses: ./.github/actions/package-nfpm | |
| with: | |
| nfpm_file_pattern: "dependencies/lua-sql-mysql/packaging/*.yaml" | |
| distrib: ${{ matrix.distrib }} | |
| package_extension: rpm | |
| arch: amd64 | |
| version: "2.6.0" | |
| release: "1" | |
| commit_hash: ${{ github.sha }} | |
| cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-lua-sql-mysql-${{ matrix.distrib }} | |
| rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }} | |
| rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }} | |
| rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }} | |
| stability: ${{ needs.get-environment.outputs.stability }} | |
| deliver-rpm: | |
| if: ${{ contains(fromJson('["unstable", "testing", "stable"]'), needs.get-environment.outputs.stability) }} | |
| needs: [get-environment, package] | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| distrib: [el8, el9] | |
| name: deliver ${{ matrix.distrib }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Publish RPM packages | |
| uses: ./.github/actions/rpm-delivery | |
| with: | |
| module_name: lua-sql-mysql | |
| distrib: ${{ matrix.distrib }} | |
| artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} | |
| cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-lua-sql-mysql-${{ matrix.distrib }} | |
| stability: ${{ needs.get-environment.outputs.stability }} |