Add --break-system-packages to pip in Dockerfile #65
Workflow file for this run
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: RPM and DEB | |
on: | |
push: | |
tags: | |
- 'v*' | |
#branches: [ main ] | |
jobs: | |
build_and_push_rpm: | |
runs-on: ubuntu-latest | |
container: rockylinux/rockylinux | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build rpm packages | |
run: | | |
yum install -y python3 rpm-build | |
python3 setup.py bdist_rpm | |
- name: Install additional dependencies | |
run: | | |
yum install -y createrepo git-core rpm-sign tree | |
- name: Sign rpm packages | |
run: | | |
cat <<EOF | gpg --batch --import | |
${{ secrets.GPG_PRIVATE_KEY }} | |
EOF | |
rpm --import https://sakurai-youhei.github.io/python-shukujitsu/gpg | |
cat <<EOF > $HOME/.rpmmacros | |
%_signature gpg | |
%_gpg_path $HOME/.gnupg | |
%_gpg_name Youhei Sakurai | |
%_gpgbin /usr/bin/gpg | |
%__gpg_sign_cmd %{__gpg} gpg --force-v3-sigs --batch --verbose --no-armor --passphrase-fd 0 --pinentry-mode loopback --no-secmem-warning -u '%{_gpg_name}' -sbo %{__signature_filename} %{__plaintext_filename} | |
EOF | |
echo | rpmsign --addsign dist/*.rpm | |
- uses: actions/checkout@v2 | |
with: | |
ref: gh-pages | |
path: gh-pages | |
- name: Update rpm directory | |
working-directory: gh-pages | |
run: | | |
cp ../dist/*.rpm rpm/ | |
rm -rf rpm/repodata/ | |
createrepo rpm/ | |
tree -h -F -I 'index.html' -H '.' -T 'python-shukujitsu / rpm' -L 1 --noreport --charset utf-8 rpm/ > rpm/index.html | |
tree -h -F -I 'index.html' -H '.' -T 'python-shukujitsu / rpm / repodata' -L 1 --noreport --charset utf-8 rpm/repodata/ > rpm/repodata/index.html | |
- name: Commit & Push | |
working-directory: gh-pages | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
tree -I .git | |
git add --verbose --all rpm/ | |
git add --verbose --all --force rpm/repodata/ # TODO: Remove '--force' option somehow. | |
git commit --verbose -m "Update rpm via $GITHUB_REF" | |
git push origin gh-pages | |
build_and_push_deb: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build deb packages | |
run: | | |
sudo env DEBIAN_FRONTEND=noninteractive apt install -y debhelper python3-all python3-setuptools python3-pip dh-python | |
pip3 install --user stdeb | |
python3 setup.py --command-packages=stdeb.command bdist_deb sdist_dsc | |
- name: Install additional dependencies | |
run: | | |
sudo apt install -y apt-utils debsigs devscripts git-core tree | |
- name: Sign deb packages | |
run: | | |
cat <<EOF | gpg --batch --import | |
${{ secrets.GPG_PRIVATE_KEY }} | |
EOF | |
debsign -k 23A5D701AE2F6BE1 deb_dist/*.buildinfo deb_dist/*.changes deb_dist/*.dsc | |
debsigs -k 23A5D701AE2F6BE1 --sign=origin deb_dist/*.deb | |
- uses: actions/checkout@v2 | |
with: | |
ref: gh-pages | |
path: gh-pages | |
- name: Update deb directory 1 | |
working-directory: gh-pages | |
run: | | |
cp ../deb_dist/*.buildinfo deb/ | |
cp ../deb_dist/*.changes deb/ | |
cp ../deb_dist/*.deb deb/ | |
cp ../deb_dist/*.dsc deb/ | |
cp ../deb_dist/*.debian.tar.* deb/ | |
cp ../deb_dist/*.orig.tar.* deb/ | |
- name: Update deb directory 2 | |
working-directory: gh-pages/deb | |
run: | | |
rm -f Packages* Sources* *Release* | |
apt-ftparchive packages . | tee Packages | gzip > Packages.gz | |
apt-ftparchive sources . | tee Sources | gzip > Sources.gz | |
apt-ftparchive release -o APT::FTPArchive::Release::Label=python-shukujitsu -o APT::FTPArchive::Release::Origin=python-shukujitsu . > Release | |
echo 'Changelogs: https://sakurai-youhei.github.io/python-shukujitsu/deb/@CHANGEPATH@_changelog' >> Release | |
echo | gpg --batch --passphrase-fd 0 --pinentry-mode loopback -abs -o Release.gpg Release | |
echo | gpg --batch --passphrase-fd 0 --pinentry-mode loopback --clearsign -o InRelease Release | |
mkdir -p p/python-shukujitsu | |
ls *.deb | xargs -I{} sh -c 'dpkg-deb --fsys-tarfile {} | tar -x -O --wildcards ./usr/share/doc/python-shukujitsu/changelog\* | gzip -d - > p/python-shukujitsu/`echo {} | rev | cut -c 9- | rev`_changelog' | |
tree -h -F -I 'index.html' -H '.' -T 'python-shukujitsu / deb' -L 1 --noreport --charset utf-8 . > index.html | |
tree -h -F -I 'index.html' -H '.' -T 'python-shukujitsu / deb / p' -L 1 --noreport --charset utf-8 p/ > p/index.html | |
tree -h -F -I 'index.html' -H '.' -T 'python-shukujitsu / deb / p / python-shukujitsu' -L 1 --noreport --charset utf-8 p/python-shukujitsu/ > p/python-shukujitsu/index.html | |
- name: Commit & Push | |
working-directory: gh-pages | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
tree -I .git | |
git add --verbose --all deb/ | |
git add --verbose --all --force deb/p/ # TODO: Remove '--force' option somehow. | |
git add --verbose --all --force deb/p/python-shukujitsu/ # TODO: Remove '--force' option somehow. | |
git commit --verbose -m "Update deb via $GITHUB_REF" | |
git push origin gh-pages |