libqbase/.github/workflows/build.yml
Michael Chernigin 615407fce0
refactor: rename baselib to libqbase (#3)
* refacor: rename baselib to libqbase
* gear: rename package
* ci: rename github workflows
2023-09-26 12:20:47 +04:00

42 lines
1.2 KiB
YAML

name: qbase-build
on:
workflow_call:
inputs:
artifact:
description: "Artifact"
type: string
required: true
architecture:
description: "Architecture"
type: string
required: true
jobs:
qbase-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build qbase packages
run: |
docker pull --platform linux/${{ inputs.architecture }} \
ghcr.io/${{ github.repository }}-${{ inputs.architecture }}:latest
docker run --privileged=true --name qbase-build-${{ inputs.architecture }} -i --log-driver=none \
-a stdin -a stdout -a stderr -v "$(pwd)":/app --platform linux/${{ inputs.architecture }} \
ghcr.io/${{ github.repository }}-${{ inputs.architecture }}:latest
- name: Extract fresh packages
if: github.ref == 'refs/heads/master'
run: |
docker cp qbase-build-${{ inputs.architecture }}:/home/builder2/RPM/RPMS/ "$(pwd)/packages"
- name: Upload fresh RPM packages
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v3
with:
name: qbase-${{ inputs.artifact }}-${{ inputs.architecture }}
path: ${{ github.workspace }}/packages