Skip to content

Commit 6da9977

Browse files
committed
GH: streamline and fix github repo creation (closes: #16)
- drop 'all' architecture from matrix (which wasn't even an ARCH to begin with) - move repo creation out of matrix and into the merge/publish job - build source packages only on riscv64 and not on the slower ARCHs - general streamlining / avoid duplication (closes: #16)
1 parent 9920776 commit 6da9977

File tree

3 files changed

+23
-26
lines changed

3 files changed

+23
-26
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ jobs:
1414
strategy:
1515
matrix:
1616
include:
17-
- architecture: all
18-
runner: ubuntu-latest
1917
- architecture: armhf
2018
runner: ubuntu-24.04-arm
2119
- architecture: arm64
@@ -27,29 +25,18 @@ jobs:
2725
uses: actions/checkout@v4
2826
with:
2927
fetch-depth: 1
30-
- name: Set up build environment and artifacts directory
28+
- name: Set up build environment
3129
run: |
3230
sudo apt-get update
33-
sudo apt-get install -y dpkg-dev debhelper reprepro
34-
- name: Build deb packages
31+
sudo apt-get install -y dpkg-dev debhelper
32+
- name: Build deb and source packages
3533
uses: jtdor/build-deb-action@v1
3634
env:
3735
DEB_BUILD_OPTIONS: noautodbgsym
3836
with:
39-
host-arch: ${{ matrix.architecture == 'all' && 'amd64' || matrix.architecture }}
40-
buildpackage-opts: --build=full
37+
host-arch: ${{ matrix.architecture }}
38+
buildpackage-opts: --build=${{ matrix.architecture == 'riscv64' && 'full' || 'any' }}
4139
docker-image: debian:testing-20250407
42-
- name: Import GPG key
43-
id: import_gpg
44-
uses: crazy-max/ghaction-import-gpg@v6
45-
with:
46-
gpg_private_key: ${{ secrets.GPG_KEY1 }}
47-
passphrase: ${{ secrets.GPG_PASSPHRASE1 }}
48-
- name: Create distribution repository
49-
run: |
50-
reprepro -b debian/artifacts includedsc stable debian/artifacts/*.dsc
51-
reprepro -b debian/artifacts includedeb stable debian/artifacts/*.deb
52-
reprepro -b debian/artifacts export
5340
- name: "Upload artifacts"
5441
uses: actions/upload-artifact@v4
5542
with:
@@ -58,7 +45,7 @@ jobs:
5845
if-no-files-found: ignore
5946

6047
merge:
61-
name: "Merge artifacts"
48+
name: "Merge artifacts and publish"
6249
needs: build-debs
6350
runs-on: ubuntu-latest
6451
steps:
@@ -72,15 +59,25 @@ jobs:
7259
path: debian/artifacts/
7360
pattern: artifacts-*
7461
merge-multiple: true
75-
- name: Commit changes if any
62+
- name: Set up build environment
63+
run: |
64+
sudo apt-get update
65+
sudo apt-get install -y reprepro
66+
- name: Import GPG key
67+
id: import_gpg
68+
uses: crazy-max/ghaction-import-gpg@v6
69+
with:
70+
gpg_private_key: ${{ secrets.GPG_KEY1 }}
71+
passphrase: ${{ secrets.GPG_PASSPHRASE1 }}
72+
- name: Create distribution repository and commit to data branch
7673
run: |
7774
git checkout --orphan data
7875
git rm -rf --cached .
79-
mkdir -p data
80-
cp -rf ${{ github.workspace }}/debian/artifacts/{pool,dists} data/
8176
git config --global user.name "github-actions"
8277
git config --global user.email "[email protected]"
83-
git add data/.
78+
for file in debian/artifacts/*.changes; do reprepro -b debian/artifacts include current $file;done
79+
reprepro -b debian/artifacts export
80+
git add debian/artifacts/{pool,dists}
8481
git diff --cached --quiet || git commit --allow-empty -m "Update published repository files"
8582
git push --force --set-upstream origin data
8683
- name: "publish repository to web server"

.github/workflows/directory-listing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
- name: Generate Directory Listings
1818
uses: jayanta525/[email protected]
1919
with:
20-
FOLDER: data # directory to generate index
20+
folder: debian/artifacts # directory to generate index
2121

2222
- name: Upload artifact
2323
uses: actions/upload-pages-artifact@v3
2424
with:
25-
path: 'data' # upload generated folder
25+
path: 'debian/artifacts' # upload generated folder
2626

2727
deploy:
2828
needs: pages-directory-listing

debian/artifacts/conf/distributions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Origin: Armbian
22
Label: Armbian Package Archive APA
33
Suite: stable
44
Codename: current
5-
Architectures: amd64 arm64 riscv64 armhf source
5+
Architectures: arm64 riscv64 armhf source
66
Components: main
77
Description: packages provided by the Armbian project
88
SignWith: DF00FAF1C577104B50BF1D0093D6889F9F0E78D5

0 commit comments

Comments
 (0)