pdi-main build #74
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-main build | |
on: | |
push: | |
branches: [ pdi-main ] | |
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@v4 | |
with: | |
ref: pdi-main | |
- name: Checkout builder script | |
uses: actions/checkout@v4 | |
with: | |
repository: jbigot/pkg_builder | |
path: pkg_builder | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- name: Checkout distrib repo | |
uses: actions/checkout@v4 | |
with: | |
repository: pdidev/repo | |
path: repo.${{ matrix.distrib }} | |
ssh-key: ${{ secrets.PDIDEV_REPO_KEY }} | |
- name: Install deps | |
run: | | |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
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: pdi-master. | |
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}" |