-
-
Notifications
You must be signed in to change notification settings - Fork 1
ci: try to build deb package #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
missytake
wants to merge
12
commits into
master
Choose a base branch
from
github-ci
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
437f2aa
ci: try to build deb package
missytake 670cc82
apt update
missytake 0d9ba93
add --mirror option
missytake f1cd9ee
ls -la
missytake 8ba9979
clone git repository instead of using the checkout action
missytake a12a489
split up into steps, retry to fix missing mirror
missytake a83d23f
fix mirror hopefully
missytake 9d48af6
fix path
missytake 3a9d05c
add libunwind-dev dependency
missytake 64ae29b
install rsync
missytake fbe2f54
build on arm, upload to download.delta.chat/dovecot/
missytake d3eeb00
split up CI runs per architecture
missytake File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- github-ci | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-amd64: | ||
runs-on: ubuntu-latest | ||
container: debian:12 | ||
steps: | ||
- name: install dependencies | ||
run: | | ||
echo "MIRRORSITE=http://deb.debian.org/debian" > /etc/pbuilderrc | ||
apt update | ||
apt install -y git-buildpackage build-essential debhelper-compat default-libmysqlclient-dev krb5-multidev libapparmor-dev libbz2-dev libcap-dev libdb-dev libexpat-dev libexttextcat-dev libicu-dev libldap2-dev liblua5.4-dev liblz4-dev liblzma-dev libpam0g-dev libpq-dev libsasl2-dev libsodium-dev libsqlite3-dev libssl-dev libstemmer-dev libsystemd-dev libwrap0-dev libzstd-dev pkg-config zlib1g-dev git libunwind-dev rsync | ||
|
||
- name: clone repository | ||
run: git clone https://github.com/chatmail/dovecot | ||
|
||
- name: build | ||
run: | | ||
cd dovecot | ||
DEB_BUILD_OPTIONS=nocheck gbp buildpackage --git-no-pristine-tar -us -uc | ||
|
||
- name: upload .deb files | ||
run: | | ||
mkdir -p "$HOME/.ssh" | ||
echo "${{ secrets.KEY }}" > "$HOME/.ssh/key" | ||
chmod 600 "$HOME/.ssh/key" | ||
rsync -rILvh -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/build-area/ "${{ secrets.USERNAME }}@download.delta.chat:/var/www/html/download/dovecot/" | ||
|
||
build-arm: | ||
runs-on: ubuntu-24.04-arm | ||
container: debian:12 | ||
steps: | ||
- name: install dependencies | ||
run: | | ||
echo "MIRRORSITE=http://deb.debian.org/debian" > /etc/pbuilderrc | ||
apt update | ||
apt install -y git-buildpackage build-essential debhelper-compat default-libmysqlclient-dev krb5-multidev libapparmor-dev libbz2-dev libcap-dev libdb-dev libexpat-dev libexttextcat-dev libicu-dev libldap2-dev liblua5.4-dev liblz4-dev liblzma-dev libpam0g-dev libpq-dev libsasl2-dev libsodium-dev libsqlite3-dev libssl-dev libstemmer-dev libsystemd-dev libwrap0-dev libzstd-dev pkg-config zlib1g-dev git libunwind-dev rsync | ||
|
||
- name: clone repository | ||
run: git clone https://github.com/chatmail/dovecot | ||
|
||
- name: build | ||
run: | | ||
cd dovecot | ||
DEB_BUILD_OPTIONS=nocheck gbp buildpackage --git-no-pristine-tar -us -uc | ||
|
||
- name: upload .deb files | ||
run: | | ||
mkdir -p "$HOME/.ssh" | ||
echo "${{ secrets.KEY }}" > "$HOME/.ssh/key" | ||
chmod 600 "$HOME/.ssh/key" | ||
rsync -rILvh -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/build-area/ "${{ secrets.USERNAME }}@download.delta.chat:/var/www/html/download/dovecot/" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should ideally use actions/checkout so it checks out the PR commit and not whatever commit is on main now.
Apparently it should just work, the only problems users seems to have here are due to insufficient privileges:
https://stackoverflow.com/questions/68578638/how-to-checkout-repo-inside-the-docker-in-github-action
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that the checkout action doesn't create the
.git
directory, butgbp
expects it to be there...Also, I'd only want to publish builds from main to https://download.delta.chat/dovecot/, as we don't have a staging environment where we could upload builds from other branches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested in #3, checkout action creates
.git
directory.Now there is a problem that
gbp
is unhappy about changes on top ofmaster
(committing.github
) that are not in the changelog. This will fail when merged onmaster
, currently it only works because the workflow is not on themaster
branch yet.