enh(chore): package perl dependencies (cpan / net-curl / libssh-session ...) #4
Workflow file for this run
This file contains 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: plink | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- "dependencies/plink/**" | |
push: | |
branches: | |
- develop | |
- dev-[2-9][0-9].[0-9][0-9].x | |
- master | |
- "[2-9][0-9].[0-9][0-9].x" | |
paths: | |
- ".github/workflows/plink.yml" | |
jobs: | |
get-environment: | |
uses: ./.github/workflows/get-environment.yml | |
package-rpm: | |
needs: [get-environment] | |
if: ${{ needs.get-environment.outputs.stability != 'stable' }} | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
include: | |
- image: packaging-alma8 | |
distrib: el8 | |
- image: packaging-alma9 | |
distrib: el9 | |
name: package ${{ matrix.distrib }} | |
container: | |
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:${{ needs.get-environment.outputs.version }} | |
credentials: | |
username: ${{ secrets.DOCKER_REGISTRY_ID }} | |
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
yum install -y wget gcc make | |
mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} | |
wget -P ~/rpmbuild/SOURCES/ https://the.earth.li/~sgtatham/putty/0.74/putty-0.74.tar.gz | |
rpmbuild -ba dependencies/plink/packaging/rpm/plink.spec | |
cp -r ~/rpmbuild/RPMS/x86_64/*.rpm . | |
shell: bash | |
- uses: actions/cache@v3 | |
with: | |
path: ./*.rpm | |
key: unsigned-${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} | |
sign-rpm: | |
needs: [package-rpm] | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
include: | |
- image: packaging-alma8 | |
distrib: el8 | |
- image: packaging-alma9 | |
distrib: el9 | |
name: sign rpm ${{ matrix.distrib }} | |
container: | |
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/rpm-signing:ubuntu | |
options: -t | |
credentials: | |
username: ${{ secrets.DOCKER_REGISTRY_ID }} | |
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} | |
steps: | |
- run: apt-get install -y zstd | |
shell: bash | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: ./*.rpm | |
key: unsigned-${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} | |
- run: echo "HOME=/root" >> $GITHUB_ENV | |
shell: bash | |
- run: rpmsign --addsign ./*.rpm | |
shell: bash | |
- uses: actions/cache@v3 | |
with: | |
path: ./*.rpm | |
key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: packages-${{ matrix.distrib }} | |
path: ./*.rpm | |
retention-days: 1 | |
deliver-rpm: | |
needs: [get-environment, sign-rpm] | |
if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} | |
runs-on: [self-hosted, common] | |
strategy: | |
matrix: | |
distrib: [el8, el9] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Delivery | |
uses: ./.github/actions/rpm-delivery | |
with: | |
module_name: plink | |
distrib: ${{ matrix.distrib }} | |
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} | |
cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} | |
stability: ${{ needs.get-environment.outputs.stability }} |