on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]
    types: [ "review_requested", "ready_for_review" ]
  workflow_dispatch:
name: Flatpak
permissions:
  id-token: write
  contents: read
jobs:
  flatpak:
    name: "GNOME on Flatpak"
    runs-on: ubuntu-latest
    if: ${{ github.event.pull_request.user.login != 'weblate' }}
    container:
      image: bilelmoussaoui/flatpak-github-actions:gnome-45
      options: --privileged
    strategy:
      matrix:
        arch: [x86_64]
      fail-fast: false
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: recursive
      - uses: flatpak/flatpak-github-actions/flatpak-builder@v6.3
        with:
          bundle: org.nickvision.money.flatpak
          manifest-path: flatpak/org.nickvision.money.json
          cache-key: flatpak-builder-${{ github.sha }}
          arch: ${{ matrix.arch }}
          restore-cache: true
