ymp build CI/CD #553
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: CI | |
on: | |
push: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
compile_deb: | |
name: Create deb package (x86_86) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- name: Run the build process with Docker | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: debian:testing | |
options: -v ${{ github.workspace }}:/root -v /output:/output | |
run: | | |
set -ex | |
cd /root | |
apt update | |
apt install devscripts equivs -y | |
yes | mk-build-deps --install | |
debuild -us -uc -b | |
mkdir -p /output/ | |
mv ../*.deb /output/ | |
mv ./*.deb /output/ | |
compile_ymp: | |
name: Create deb package (x86_86) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- name: Run the build process with Docker | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: registry.gitlab.com/turkman/devel/assets/docker-images | |
options: -v ${{ github.workspace }}:/root -v /output:/output | |
run: | | |
mkdir -p /tmp/ymp-build/ | |
ymp repo --update --ignore-gpg | |
ymp it bash git build-base --no-emerge | |
ymp build --unsafe /root --output=/output | |
release: | |
needs: [compile_deb, compile_ymp] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- name: Merge packages from build | |
run: | | |
mkdir -p /output/ | |
cp -r /github/workspace/*/output/* /output/ | |
- name: Create Release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "current" | |
prerelease: false | |
title: "Latest release" | |
files: | | |
/output/* | |