|
| 1 | +name: lua-base64 |
| 2 | + |
| 3 | +concurrency: |
| 4 | + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
| 5 | + cancel-in-progress: true |
| 6 | + |
| 7 | +on: |
| 8 | + workflow_dispatch: |
| 9 | + pull_request: |
| 10 | + paths: |
| 11 | + - '.github/workflows/lua-base64.yml' |
| 12 | + - '../../dependencies/lua-base64/**' |
| 13 | + push: |
| 14 | + branches: |
| 15 | + - develop |
| 16 | + - master |
| 17 | + paths: |
| 18 | + - '.github/workflows/lua-base64.yml' |
| 19 | + - '../../dependencies/lua-base64/**' |
| 20 | + |
| 21 | +jobs: |
| 22 | + dependency-scan: |
| 23 | + uses: centreon/security-tools/.github/workflows/dependency-analysis.yml@main |
| 24 | + |
| 25 | + get-environment: |
| 26 | + needs: [dependency-scan] |
| 27 | + uses: ./.github/workflows/get-environment.yml |
| 28 | + |
| 29 | + package: |
| 30 | + needs: [get-environment] |
| 31 | + |
| 32 | + strategy: |
| 33 | + fail-fast: false |
| 34 | + matrix: |
| 35 | + distrib: [el8, el9, el10, bullseye, bookworm, trixie, jammy, noble] |
| 36 | + include: |
| 37 | + - package_extension: rpm |
| 38 | + image: packaging-stream-connectors-nfpm-alma8 |
| 39 | + distrib: el8 |
| 40 | + - package_extension: rpm |
| 41 | + image: packaging-stream-connectors-nfpm-alma9 |
| 42 | + distrib: el9 |
| 43 | + - package_extension: rpm |
| 44 | + image: packaging-stream-connectors-nfpm-alma10 |
| 45 | + distrib: el10 |
| 46 | + - package_extension: deb |
| 47 | + image: packaging-stream-connectors-nfpm-bullseye |
| 48 | + distrib: bullseye |
| 49 | + - package_extension: deb |
| 50 | + image: packaging-stream-connectors-nfpm-bookworm |
| 51 | + distrib: bookworm |
| 52 | + - package_extension: deb |
| 53 | + image: packaging-stream-connectors-nfpm-trixie |
| 54 | + distrib: trixie |
| 55 | + - package_extension: deb |
| 56 | + image: packaging-stream-connectors-nfpm-jammy |
| 57 | + distrib: jammy |
| 58 | + - package_extension: deb |
| 59 | + image: packaging-stream-connectors-nfpm-noble |
| 60 | + distrib: noble |
| 61 | + |
| 62 | + runs-on: ubuntu-24.04 |
| 63 | + |
| 64 | + container: |
| 65 | + image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest |
| 66 | + credentials: |
| 67 | + username: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }} |
| 68 | + password: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }} |
| 69 | + |
| 70 | + name: package ${{ matrix.distrib }} |
| 71 | + |
| 72 | + steps: |
| 73 | + - name: Checkout sources |
| 74 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 75 | + |
| 76 | + - name: Checkout base64 sources |
| 77 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 78 | + with: |
| 79 | + repository: "iskolbin/lbase64" |
| 80 | + path: "base64-src" |
| 81 | + ref: "v1.5.3" |
| 82 | + |
| 83 | + - name: Prepare packaging of lua-base64 |
| 84 | + run: cp -r base64-src/lbase64 dependencies/lua-base64/lbase64 |
| 85 | + shell: bash |
| 86 | + |
| 87 | + - name: Package |
| 88 | + uses: ./.github/actions/package-nfpm |
| 89 | + with: |
| 90 | + nfpm_file_pattern: "dependencies/lua-base64/packaging/*.yaml" |
| 91 | + distrib: ${{ matrix.distrib }} |
| 92 | + package_extension: ${{ matrix.package_extension }} |
| 93 | + arch: all |
| 94 | + version: "1.5" |
| 95 | + release: "3" |
| 96 | + commit_hash: ${{ github.sha }} |
| 97 | + cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-lua-base64-${{ matrix.distrib }} |
| 98 | + rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }} |
| 99 | + rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }} |
| 100 | + rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }} |
| 101 | + stability: ${{ needs.get-environment.outputs.stability }} |
| 102 | + artifact_name: "package-lua-base64-${{ matrix.distrib }}" |
| 103 | + |
| 104 | + test-packages: |
| 105 | + needs: [get-environment, package] |
| 106 | + strategy: |
| 107 | + fail-fast: false |
| 108 | + matrix: |
| 109 | + include: |
| 110 | + - package_extension: rpm |
| 111 | + image: almalinux:8 |
| 112 | + distrib: el8 |
| 113 | + - package_extension: rpm |
| 114 | + image: almalinux:9 |
| 115 | + distrib: el9 |
| 116 | + - package_extension: rpm |
| 117 | + image: almalinux:10 |
| 118 | + distrib: el10 |
| 119 | + - package_extension: deb |
| 120 | + image: debian:bullseye |
| 121 | + distrib: bullseye |
| 122 | + - package_extension: deb |
| 123 | + image: debian:bookworm |
| 124 | + distrib: bookworm |
| 125 | + - package_extension: deb |
| 126 | + image: debian:trixie |
| 127 | + distrib: trixie |
| 128 | + - package_extension: deb |
| 129 | + image: ubuntu:jammy |
| 130 | + distrib: jammy |
| 131 | + - package_extension: deb |
| 132 | + image: ubuntu:noble |
| 133 | + distrib: noble |
| 134 | + |
| 135 | + runs-on: ubuntu-24.04 |
| 136 | + container: |
| 137 | + image: ${{ matrix.image }} |
| 138 | + |
| 139 | + name: Test lua packages on ${{ matrix.package_extension }} ${{ matrix.distrib }} |
| 140 | + steps: |
| 141 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 142 | + |
| 143 | + - name: Test packaged libs |
| 144 | + uses: ./.github/actions/test-packages |
| 145 | + with: |
| 146 | + package_extension: ${{ matrix.package_extension }} |
| 147 | + distrib: ${{ matrix.distrib }} |
| 148 | + cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-lua-base64-${{ matrix.distrib }} |
| 149 | + test_type: dependency |
| 150 | + |
| 151 | + - name: Upload error log |
| 152 | + if: failure() |
| 153 | + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 |
| 154 | + with: |
| 155 | + name: install_error_log_${{ matrix.distrib }} |
| 156 | + path: install_error_${{ matrix.distrib }}.log |
| 157 | + |
| 158 | + deliver-rpm: |
| 159 | + if: ${{ contains(fromJson('["unstable", "testing", "stable"]'), needs.get-environment.outputs.stability) }} |
| 160 | + needs: [get-environment, package, test-packages] |
| 161 | + runs-on: ubuntu-24.04 |
| 162 | + strategy: |
| 163 | + matrix: |
| 164 | + distrib: [el8, el9, el10] |
| 165 | + name: deliver ${{ matrix.distrib }} |
| 166 | + |
| 167 | + steps: |
| 168 | + - name: Checkout sources |
| 169 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 170 | + |
| 171 | + - name: Publish RPM packages |
| 172 | + uses: ./.github/actions/rpm-delivery |
| 173 | + with: |
| 174 | + module_name: lua-base64 |
| 175 | + distrib: ${{ matrix.distrib }} |
| 176 | + artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} |
| 177 | + cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-lua-base64-${{ matrix.distrib }} |
| 178 | + stability: ${{ needs.get-environment.outputs.stability }} |
| 179 | + |
| 180 | + deliver-deb: |
| 181 | + if: ${{ contains(fromJson('["unstable", "testing", "stable"]'), needs.get-environment.outputs.stability) }} |
| 182 | + needs: [get-environment, package, test-packages] |
| 183 | + runs-on: ubuntu-24.04 |
| 184 | + strategy: |
| 185 | + matrix: |
| 186 | + distrib: [bullseye, bookworm, trixie, jammy, noble] |
| 187 | + name: deliver ${{ matrix.distrib }} |
| 188 | + |
| 189 | + steps: |
| 190 | + - name: Checkout sources |
| 191 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 192 | + |
| 193 | + - name: Publish DEB packages |
| 194 | + uses: ./.github/actions/deb-delivery |
| 195 | + with: |
| 196 | + module_name: lua-tz |
| 197 | + distrib: ${{ matrix.distrib }} |
| 198 | + artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} |
| 199 | + cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-lua-base64-${{ matrix.distrib }} |
| 200 | + stability: ${{ needs.get-environment.outputs.stability }} |
0 commit comments