Skip to content

use deps branch

use deps branch #61

Workflow file for this run

name: Pull request build
on:
pull_request:
push:
branches: [ 'wait4upstream/*' ]
jobs:
build_and_publish:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
distrib: [debian, fedora, ubuntu]
steps:
- name: Checkout packages
uses: actions/checkout@v3
with:
ref: "${{ github.head_ref }}"
- name: Checkout builder script
uses: actions/checkout@v3
with:
repository: jbigot/pkg_builder
path: pkg_builder
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Checkout distrib repo
uses: actions/checkout@v3
with:
repository: pdidev/repo
path: repo.${{ matrix.distrib }}
ssh-key: ${{ secrets.PDIDEV_REPO_KEY }}
- name: Install deps
run: |
curl -o - https://www.aptly.info/pubkey.txt | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/aptly.gpg > /dev/null
echo "deb http://repo.aptly.info/ squeeze main" | sudo tee /etc/apt/sources.list.d/aptly.list
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install devscripts equivs aptly
pip3.8 install -r pkg_builder/requirements.txt
- name: Build packages
env:
KEY_PASSPHRASE: ${{ secrets.KEY_PASSPHRASE }}
DISTRIB: ${{ matrix.distrib }}
NEW_BRANCH: "${{ github.head_ref }}."
run: |
git -C repo.${DISTRIB} config user.email "github.action@example.com"
git -C repo.${DISTRIB} config user.name "Github Action"
git -C repo.${DISTRIB} fetch origin ${DISTRIB}
git -C repo.${DISTRIB} checkout --orphan "${NEW_BRANCH}${DISTRIB}"
git -C repo.${DISTRIB} rm -rf .
sed "s%pdidev/repo/%pdidev/repo/${NEW_BRANCH}%g" -i build.conf
python3.8 pkg_builder/pkgbuild -D ${DISTRIB} -j 3 -p "${KEY_PASSPHRASE}"
git -C repo.${DISTRIB} add -A .
git -C repo.${DISTRIB} commit -C origin/${DISTRIB}
git -C repo.${DISTRIB} push -f origin "${NEW_BRANCH}${DISTRIB}"