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)
This commit is contained in:
Rolf Leggewie
2025-04-27 08:55:33 +08:00
parent 99207766ab
commit 6da9977735
3 changed files with 23 additions and 26 deletions

View File

@@ -14,8 +14,6 @@ jobs:
strategy:
matrix:
include:
- architecture: all
runner: ubuntu-latest
- architecture: armhf
runner: ubuntu-24.04-arm
- architecture: arm64
@@ -27,29 +25,18 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up build environment and artifacts directory
- name: Set up build environment
run: |
sudo apt-get update
sudo apt-get install -y dpkg-dev debhelper reprepro
- name: Build deb packages
sudo apt-get install -y dpkg-dev debhelper
- name: Build deb and source packages
uses: jtdor/build-deb-action@v1
env:
DEB_BUILD_OPTIONS: noautodbgsym
with:
host-arch: ${{ matrix.architecture == 'all' && 'amd64' || matrix.architecture }}
buildpackage-opts: --build=full
host-arch: ${{ matrix.architecture }}
buildpackage-opts: --build=${{ matrix.architecture == 'riscv64' && 'full' || 'any' }}
docker-image: debian:testing-20250407
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_KEY1 }}
passphrase: ${{ secrets.GPG_PASSPHRASE1 }}
- name: Create distribution repository
run: |
reprepro -b debian/artifacts includedsc stable debian/artifacts/*.dsc
reprepro -b debian/artifacts includedeb stable debian/artifacts/*.deb
reprepro -b debian/artifacts export
- name: "Upload artifacts"
uses: actions/upload-artifact@v4
with:
@@ -58,7 +45,7 @@ jobs:
if-no-files-found: ignore
merge:
name: "Merge artifacts"
name: "Merge artifacts and publish"
needs: build-debs
runs-on: ubuntu-latest
steps:
@@ -72,15 +59,25 @@ jobs:
path: debian/artifacts/
pattern: artifacts-*
merge-multiple: true
- name: Commit changes if any
- name: Set up build environment
run: |
sudo apt-get update
sudo apt-get install -y reprepro
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_KEY1 }}
passphrase: ${{ secrets.GPG_PASSPHRASE1 }}
- name: Create distribution repository and commit to data branch
run: |
git checkout --orphan data
git rm -rf --cached .
mkdir -p data
cp -rf ${{ github.workspace }}/debian/artifacts/{pool,dists} data/
git config --global user.name "github-actions"
git config --global user.email "github-actions@github.com"
git add data/.
for file in debian/artifacts/*.changes; do reprepro -b debian/artifacts include current $file;done
reprepro -b debian/artifacts export
git add debian/artifacts/{pool,dists}
git diff --cached --quiet || git commit --allow-empty -m "Update published repository files"
git push --force --set-upstream origin data
- name: "publish repository to web server"

View File

@@ -17,12 +17,12 @@ jobs:
- name: Generate Directory Listings
uses: jayanta525/github-pages-directory-listing@v4.0.0
with:
FOLDER: data # directory to generate index
folder: debian/artifacts # directory to generate index
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'data' # upload generated folder
path: 'debian/artifacts' # upload generated folder
deploy:
needs: pages-directory-listing

View File

@@ -2,7 +2,7 @@ Origin: Armbian
Label: Armbian Package Archive APA
Suite: stable
Codename: current
Architectures: amd64 arm64 riscv64 armhf source
Architectures: arm64 riscv64 armhf source
Components: main
Description: packages provided by the Armbian project
SignWith: DF00FAF1C577104B50BF1D0093D6889F9F0E78D5