pdi-master build #876
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: pdi-master build | |
on: | |
push: | |
branches: [ pdi-master ] | |
schedule: | |
- cron: '27 2 * * *' # daily build at 2:27AM | |
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: pdi-master | |
- 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/ nightly 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: pdi-master. | |
run: | | |
git -C repo.${DISTRIB} config user.email "[email protected]" | |
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}" |