salt/.github/workflows/build-deb-packages.yml
2023-01-27 07:35:00 -07:00

60 lines
1.6 KiB
YAML

name: Build Salt Packages
on:
workflow_call:
inputs:
salt-version:
type: string
required: true
description: The Salt version to set prior to building packages.
jobs:
build:
name: DEB
runs-on:
- self-hosted
- linux
- ${{ matrix.arch }}
strategy:
fail-fast: false
max-parallel: 2
matrix:
arch:
- x86_64
- aarch64
container:
image: ghcr.io/saltstack/salt-ci-containers/debian:11
steps:
- uses: actions/checkout@v3
with:
path: build-deb-pkg
- name: Download Onedir Tarball as an Artifact
uses: actions/download-artifact@v3
with:
name: salt-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz
path: build-deb-pkg/artifacts/
- name: Download System Dependencies
run: |
apt update
apt install -y python3 python3-venv python3-pip build-essential devscripts debhelper bash-completion
- name: Build Deb
env:
SALT_ONEDIR_ARCHIVE: "${{ github.workspace }}/build-deb-pkg/artifacts/salt-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz"
run: |
cd build-deb-pkg
echo "${{ inputs.salt-version }}" > salt/_version.txt
ln -sf pkg/debian/ .
debuild -e SALT_ONEDIR_ARCHIVE -uc -us
- name: Upload DEBs
uses: actions/upload-artifact@v3
with:
name: salt-${{ matrix.arch }}-debs
path: ${{ github.workspace }}/*.deb
if-no-files-found: error
retention-days: 7