Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua-Riek committed Dec 2, 2024
1 parent 3be9aee commit 476454a
Showing 1 changed file with 10 additions and 27 deletions.
37 changes: 10 additions & 27 deletions .github/workflows/compile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,13 @@ on:
workflow_dispatch:

jobs:
parse:
runs-on: ubuntu-latest
outputs:
release_version: ${{ steps.parsechangelog.outputs.test }}

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Parse package distribution
id: parsechangelog
shell: bash
run: |
distribution="$(dpkg-parsechangelog -S Distribution)"
case "$distribution" in
jammy) echo "test=22.04" >> $GITHUB_OUTPUT ;;
noble) echo "test=24.04" >> $GITHUB_OUTPUT ;;
oracular) echo "test=24.10" >> $GITHUB_OUTPUT ;;
*) exit 1 ;;
esac
build:
runs-on: ubuntu-latest
needs: parse
container: ubuntu:${{ needs.parse.outputs.release_version }}

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Update package list
shell: bash
run: apt-get update
Expand All @@ -54,17 +34,20 @@ jobs:

- name: Configure build-dependencies
shell: bash
run: apt-get build-dep . -y
run: apt-get install -y pbuilder

- name: Build package
shell: bash
run: |
echo "artifacts_path=$(realpath ..)" >> $GITHUB_ENV
dpkg-buildpackage --host-arch arm64 --unsigned-source --unsigned-changes
distribution="$(dpkg-parsechangelog -S Distribution)"
dpkg-source -b .
sudo pbuilder create --distribution jammy
sudo pbuilder build --distribution ${distribution} --buildresult ../out --debbuildopts "-a arm64" --architecture arm64 ../*.dsc
- name: Upload Artifact
uses: actions/upload-artifact@v4.3.3
with:
name: ubuntu-rockchip-meta
path: ${{ env.artifacts_path }}/*.deb
path: ${{ env.artifacts_path }}/out/*
if-no-files-found: error

0 comments on commit 476454a

Please sign in to comment.