Skip to content

Commit

Permalink
add github actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua-Riek committed Oct 10, 2024
1 parent fab43f7 commit f0faf7f
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/compile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Build

on:
push:
branches:
- jammy
- noble
- oracular
pull_request:
branches:
- jammy
- noble
- oracular
workflow_dispatch:

jobs:
foobar:
runs-on: ubuntu-latest
outputs:
distribution: ${{ steps.export.outputs.test }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Export package distribution
shell: bash
id: export
run: echo "test=$(dpkg-parsechangelog -S Distribution)" >> $GITHUB_OUTPUT

build:
runs-on: ubuntu-latest
needs: foobar
container: ubuntu:${{ needs.foobar.outputs.distribution == 'jammy' && '22.04' || needs.foobar.outputs.distribution == 'noble' && '24.04' }}

steps:
- name: Update package list
shell: bash
run: echo ${BRANCH_NAME}

- name: Update package list
shell: bash
run: apt-get update

- name: Upgrade packages
shell: bash
run: apt-get upgrade -y

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

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

- name: Build package
shell: bash
run: |
echo "artifacts_path=$(realpath ..)" >> $GITHUB_ENV
dpkg-buildpackage --host-arch arm64 --unsigned-source --unsigned-changes
- name: Upload Artifact
uses: actions/upload-artifact@v4.3.3
with:
name: u-boot-rockchip
path: ${{ env.artifacts_path }}/*.deb
if-no-files-found: error

0 comments on commit f0faf7f

Please sign in to comment.