mirror of
https://github.com/openziti/ziti.git
synced 2026-10-08 05:41:20 +00:00
138 lines
4.7 KiB
YAML
138 lines
4.7 KiB
YAML
name: Publish Linux Packages
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
ziti-version:
|
|
description: generated by 'ziti-ci get-current-version'
|
|
type: string
|
|
required: true
|
|
|
|
jobs:
|
|
publish-linux-packages:
|
|
name: ${{ matrix.package_name }} ${{ matrix.arch.rpm }} ${{ matrix.nfpm_packager }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
package_name:
|
|
- openziti
|
|
- openziti-controller
|
|
- openziti-router
|
|
arch:
|
|
- goreleaser: amd64
|
|
gox: amd64
|
|
deb: amd64
|
|
rpm: x86_64
|
|
- goreleaser: arm64
|
|
gox: arm64
|
|
deb: arm64
|
|
rpm: aarch64
|
|
- goreleaser: armv7
|
|
gox: arm
|
|
deb: armv7
|
|
rpm: armv7
|
|
nfpm_packager:
|
|
- rpm
|
|
- deb
|
|
# - archlinux # (pacman)
|
|
# - apk
|
|
env:
|
|
ZITI_VERSION: ${{ inputs.ziti-version || github.event.inputs.ziti-version }}
|
|
ZITI_MAINTAINER: "OpenZiti Maintainers <developers@openziti.org>"
|
|
ZITI_HOMEPAGE: "https://openziti.io"
|
|
ZITI_VENDOR: "NetFoundry"
|
|
GOARCH: ${{ matrix.arch.goreleaser }}
|
|
MINIMUM_SYSTEMD_VERSION: 232
|
|
ZITI_DEB_TEST_REPO: ${{ vars.ZITI_DEB_TEST_REPO || 'zitipax-openziti-deb-test' }}
|
|
ZITI_DEB_PROD_REPO: ${{ vars.ZITI_DEB_PROD_REPO || 'zitipax-openziti-deb-stable' }}
|
|
ZITI_RPM_TEST_REPO: ${{ vars.ZITI_RPM_TEST_REPO || 'zitipax-openziti-rpm-test' }}
|
|
ZITI_RPM_PROD_REPO: ${{ vars.ZITI_RPM_PROD_REPO || 'zitipax-openziti-rpm-stable' }}
|
|
steps:
|
|
- name: Checkout Workspace
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Download Linux Release Artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: linux-release-${{ github.run_id }}
|
|
path: release/
|
|
|
|
- name: Move Release Artifact for Architecture to Predictable Location for nfpm
|
|
shell: bash
|
|
run: |
|
|
mv -v ./release/${{ matrix.arch.gox }}/linux/ziti \
|
|
./release/ziti
|
|
|
|
- name: Build Package
|
|
id: nfpm
|
|
uses: burningalchemist/action-gh-nfpm@v1
|
|
# uses: netfoundry/action-gh-nfpm@main
|
|
with:
|
|
nfpm_version: "2.32.0"
|
|
packager: ${{ matrix.nfpm_packager }}
|
|
config: dist/dist-packages/linux/nfpm-${{ matrix.package_name }}.yaml
|
|
target: release/
|
|
|
|
- name: get the package name from the output
|
|
run: echo ${{ steps.nfpm.outputs.package }}
|
|
shell: bash
|
|
|
|
- run: ls -lh release/
|
|
shell: bash
|
|
|
|
- name: upload package artifact to build summary page
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.package_name }}-${{ matrix.arch.goreleaser }}-${{ matrix.nfpm_packager }}
|
|
path: ./release/${{ matrix.package_name }}*.${{ matrix.nfpm_packager }}
|
|
if-no-files-found: error
|
|
|
|
- name: Configure jFrog CLI
|
|
uses: jfrog/setup-jfrog-cli@v4
|
|
env:
|
|
JF_ENV_1: ${{ secrets.ZITI_ARTIFACTORY_CLI_CONFIG_PACKAGE_UPLOAD }}
|
|
|
|
- name: Upload RPM to Artifactory testing repo
|
|
if: github.ref == 'refs/heads/release-next' && matrix.nfpm_packager == 'rpm'
|
|
shell: bash
|
|
run: >
|
|
jf rt upload
|
|
./release/${{ matrix.package_name }}*.rpm
|
|
${{ env.ZITI_RPM_TEST_REPO }}/redhat/${{ matrix.arch.rpm }}/
|
|
--recursive=false
|
|
--flat=true
|
|
|
|
- name: Upload RPM to Artifactory release repo
|
|
if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release-v'))
|
|
&& matrix.nfpm_packager == 'rpm'
|
|
shell: bash
|
|
run: >
|
|
jf rt upload
|
|
./release/${{ matrix.package_name }}*.rpm
|
|
${{ env.ZITI_RPM_PROD_REPO }}/redhat/${{ matrix.arch.rpm }}/
|
|
--recursive=false
|
|
--flat=true
|
|
|
|
- name: Upload DEB to Artifactory testing repo
|
|
if: github.ref == 'refs/heads/release-next' && matrix.nfpm_packager == 'deb'
|
|
shell: bash
|
|
run: >
|
|
jf rt upload
|
|
./release/${{ matrix.package_name }}*.deb
|
|
${{ env.ZITI_DEB_TEST_REPO }}/pool/${{ matrix.package_name }}/${{ matrix.arch.deb }}/
|
|
--deb=debian/main/${{ matrix.arch.deb }}
|
|
--recursive=false
|
|
--flat=true
|
|
|
|
- name: Upload DEB to Artifactory release repo
|
|
if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release-v'))
|
|
&& matrix.nfpm_packager == 'deb'
|
|
shell: bash
|
|
run: >
|
|
jf rt upload
|
|
./release/${{ matrix.package_name }}*.deb
|
|
${{ env.ZITI_DEB_PROD_REPO }}/pool/${{ matrix.package_name }}/${{ matrix.arch.deb }}/
|
|
--deb=debian/main/${{ matrix.arch.deb }}
|
|
--recursive=false
|
|
--flat=true
|