Skip to content

Commit f6315fd

Browse files
committed
zabbly: Add Github logic
Signed-off-by: Stéphane Graber <[email protected]>
1 parent 400db97 commit f6315fd

File tree

4 files changed

+117
-0
lines changed

4 files changed

+117
-0
lines changed

.github/FUNDING.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Frequent committers who contribute to Incus on their own time can add
2+
# themselves to the list here so users who feel like sponsoring can find
3+
# them.
4+
github:
5+
- stgraber

.github/workflows/builds.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Builds
2+
on:
3+
- push
4+
5+
permissions:
6+
contents: read
7+
8+
concurrency:
9+
group: ${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
build-zfs:
14+
name: Build OVS
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os:
19+
- ubuntu-20.04
20+
- ubuntu-22.04
21+
- ubuntu-24.04
22+
- debian-11
23+
- debian-12
24+
- debian-13
25+
arch:
26+
- amd64
27+
- arm64
28+
exclude:
29+
- os: debian-11
30+
arch: arm64
31+
runs-on:
32+
- self-hosted
33+
- cpu-4
34+
- mem-4G
35+
- arch-${{ matrix.arch }}
36+
- image-${{ matrix.os }}
37+
steps:
38+
- name: Checkout code
39+
uses: actions/checkout@v4
40+
41+
- name: Install dependencies
42+
run: |
43+
sudo apt-get install --yes \
44+
debhelper \
45+
devscripts \
46+
dh-autoreconf \
47+
dpkg-dev \
48+
equivs
49+
50+
- name: Build OVS
51+
env:
52+
PKGOS: ${{ matrix.os }}
53+
PKGARCH: ${{ matrix.arch }}
54+
run: |
55+
[ "${PKGOS}" = "debian-11" ] && CODENAME=bullseye
56+
[ "${PKGOS}" = "debian-12" ] && CODENAME=bookworm
57+
[ "${PKGOS}" = "debian-13" ] && CODENAME=trixie
58+
[ "${PKGOS}" = "ubuntu-20.04" ] && CODENAME=focal
59+
[ "${PKGOS}" = "ubuntu-22.04" ] && CODENAME=jammy
60+
[ "${PKGOS}" = "ubuntu-24.04" ] && CODENAME=noble
61+
62+
./boot.sh
63+
./configure
64+
make debian
65+
mk-build-deps --install --root-cmd sudo --remove debian/control -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes"
66+
dpkg-checkbuilddeps
67+
68+
OVSVERSION=$(grep AC_INIT configure.ac | cut -d, -f2 | awk '{print $1}')
69+
70+
dch -D ${CODENAME} -M -b -m "Automated OVS build" -v ${OVSVERSION}-${PKGARCH}-$(date -u +%Y%m%d%H%M)-$(echo ${PKGOS} | sed "s/-//g")
71+
72+
make debian-deb

.github/workflows/commits.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Commits
2+
on:
3+
- pull_request
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
dco-check:
10+
permissions:
11+
pull-requests: read # for tim-actions/get-pr-commits to get list of commits from the PR
12+
name: Signed-off-by (DCO)
13+
runs-on: ubuntu-24.04
14+
steps:
15+
- name: Get PR Commits
16+
id: 'get-pr-commits'
17+
uses: tim-actions/get-pr-commits@master
18+
with:
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
21+
- name: Check that all commits are signed-off
22+
uses: tim-actions/dco@master
23+
with:
24+
commits: ${{ steps.get-pr-commits.outputs.commits }}
25+
26+
target-branch:
27+
permissions:
28+
contents: none
29+
name: Branch target
30+
runs-on: ubuntu-24.04
31+
steps:
32+
- name: Check branch target
33+
env:
34+
TARGET: ${{ github.event.pull_request.base.ref }}
35+
run: |
36+
set -x
37+
[ "${TARGET}" = "main" ] && exit 0
38+
39+
echo "Invalid branch target: ${TARGET}"
40+
exit 1

0 commit comments

Comments
 (0)