Skip to content

flatpak/flatpak-github-actions

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

144 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flatpak Github Actions

CI

Build and deploy your Flatpak application using Github Actions

Flatpak logo

How to use

Building stage

Add a new workflow by creating a .yml file under .github/workflows with this content

on:
  push:
    branches: [main]
  pull_request:
name: CI
jobs:
  flatpak:
    name: "Flatpak"
    runs-on: ubuntu-latest
    container:
      image: bilelmoussaoui/flatpak-github-actions:gnome-40
      options: --privileged
    steps:
    - uses: actions/checkout@v2
    - uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v3
      with:
        bundle: "palette.flatpak"
        manifest-path: "org.gnome.zbrown.Palette.yml"

Inputs

Name Description Required Default
manifest-path The relative path of the manifest file Required -
bundle The bundle name Optional app.flatpak
repository-name The repository name, used to fetch the runtime when the user download the Flatpak bundle or when building the application Optional flathub
repository-url The repository url, used to fetch the runtime when the user download the Flatpak bundle or when building the application Optional https://flathub.org/repo/flathub.flatpakrepo
run-tests Enable/Disable running tests Optional false
branch The default flatpak branch Optional master
cache Enable/Disable caching .flatpak-builder directory Optional true
cache-key Specifies the cache key Optional flatpak-builder-${sha256(manifestPath)}

Deployment stage

If you want to deploy the successfully built Flatpak application to a remote repository

on:
  push:
    branches: [main]
name: Deploy
jobs:
  flatpak:
    name: "Flatpak"
    runs-on: ubuntu-latest
    container:
      image: bilelmoussaoui/flatpak-github-actions:gnome-40
      options: --privileged
    steps:
    - uses: actions/checkout@v2
    - uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v3
      name: "Build"
      with:
        bundle: "palette.flatpak"
        manifest-path: "org.gnome.zbrown.Palette.yml"
    - uses: bilelmoussaoui/flatpak-github-actions/flat-manager@v3
      name: "Deploy"
      with:
        repository: elementary
        flat-manager-url: https://flatpak-api.elementary.io
        token: some_very_hidden_token

Inputs

Name Description Required Default
repository The repository to push the build into Required -
flat-manager-url The flat-manager remote URL Required -
token A flat-manager token Required -

Docker Image

The Docker image used for the action consists of 2 parts: The base image, based on Fedora and which can be found here, and the specific image of the runtime you choose, which is generated through this GitHub Actions workflow.

You can specify the specific runtime you need to use through the image tags:

Runtime Version Tag Example
Freedesktop SDK 20.08 freedesktop-20.08 image: bilelmoussaoui/flatpak-github-actions:freedesktop-20.08
GNOME 3.38 gnome-3.38 image: bilelmoussaoui/flatpak-github-actions:gnome-3.38
GNOME 40 gnome-40 image: bilelmoussaoui/flatpak-github-actions:gnome-40
KDE 5.15 kde-5.15 image: bilelmoussaoui/flatpak-github-actions:kde-5.15
elementary BaseApp juno juno image: bilelmoussaoui/flatpak-github-actions:elementary-juno