Flatpak: Add CI workflow

This commit is contained in:
Dexter Reed 2024-04-01 21:02:30 +01:00
parent d7b805a480
commit 45ef2c1b66
No known key found for this signature in database
GPG Key ID: 68E4C1548B4808AF

43
.github/workflows/build_flatpak.yml vendored Normal file
View File

@ -0,0 +1,43 @@
name: Build latest (Flatpak)
on: [push]
concurrency:
group: ${{ github.ref }}-flatpak
cancel-in-progress: true
jobs:
build:
if: github.ref_name == github.event.repository.default_branch
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:freedesktop-23.08
options: --privileged
strategy:
matrix:
arch: [x86_64, aarch64]
# Don't fail the whole workflow if one architecture fails
fail-fast: false
steps:
- uses: actions/checkout@v4
# Docker is required by the docker/setup-qemu-action which enables emulation
- name: Install deps
if: ${{ matrix.arch != 'x86_64' }}
run: |
dnf -y install docker
- name: Set up QEMU
if: ${{ matrix.arch != 'x86_64' }}
id: qemu
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: net.classicube.flatpak.client.flatpak
manifest-path: misc/linux/flatpak/net.classicube.flatpak.client.yml
arch: ${{ matrix.arch }}
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile Flatpak build(s)'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'