Skip to content

Commit 17594c8

Browse files
split into two actions: flatpak-builder & flat-manager
1 parent 4266d9f commit 17594c8

File tree

23 files changed

+64
-8
lines changed

23 files changed

+64
-8
lines changed

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ jobs:
8282
with:
8383
allow: security.insecure
8484
context: docker
85-
file: docker/${{ matrix.runtime.name }}.Dockerfile
85+
file: flatpak-builder/docker/${{ matrix.runtime.name }}.Dockerfile
8686
push: true
8787
tags: bilelmoussaoui/flatpak-github-actions:${{ matrix.runtime.name }}

.github/workflows/flatpak-test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
options: --privileged
1414
steps:
1515
- uses: actions/checkout@v2
16-
- uses: bilelmoussaoui/flatpak-github-actions@master
16+
- uses: ./flatpak-builder
1717
with:
1818
bundle: org.example.MyApp.Devel.flatpak
19-
manifest-path: ./tests/test-project/org.example.MyApp.yaml
19+
manifest-path: ./flatpak-builder/tests/test-project/org.example.MyApp.yaml
2020
cache-key: flatpak-builder-${{ github.sha }}
2121
tests:
2222
name: Tests
@@ -31,4 +31,6 @@ jobs:
3131
with:
3232
node-version: ${{ matrix.node-version }}
3333
- run: npm install --also=dev
34+
working-directory: flatpak-builder
3435
- run: npm test
36+
working-directory: flatpak-builder

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ flatpak_app
33
repo
44
node_modules
55
.vscode
6-
package-lock.json
6+
package-lock.json
7+
.flatpak

README.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33
![CI](https://github.com/bilelmoussaoui/flatpak-github-actions/workflows/CI/badge.svg)
44

5-
Build your flatpak application using Github Actions
5+
Build and deploy your Flatpak application using Github Actions
66

77
<p align="center">
88
<img src="https://user-images.githubusercontent.com/15098724/55282117-f8253380-52fa-11e9-95a3-ccae83b23034.png" alt="Flatpak logo" />
99
</p>
1010

1111
## How to use
1212

13+
### Building stage
14+
15+
1316
Add a new workflow by creating a `.yml` file under `.github/workflows` with this content
1417

1518
```yaml
@@ -27,13 +30,13 @@ jobs:
2730
options: --privileged
2831
steps:
2932
- uses: actions/checkout@v2
30-
- uses: bilelmoussaoui/flatpak-github-actions@v2
33+
- uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@master
3134
with:
3235
bundle: "palette.flatpak"
3336
manifest-path: "org.gnome.zbrown.Palette.yml"
3437
```
3538
36-
## Inputs
39+
#### Inputs
3740
3841
| Name | Description | Required | Default |
3942
| --- | ----------- | ----------- |----|
@@ -46,7 +49,7 @@ jobs:
4649
| `cache` | Enable/Disable caching `.flatpak-builder` directory | Optional | `true` |
4750
| `cache-key` | Specifies the cache key | Optional | `flatpak-builder-${sha256(manifestPath)}` |
4851

49-
## Docker Image
52+
#### Docker Image
5053

5154
The Docker image used for the action consists of 2 parts: The base image, based on Fedora and which can be found
5255
[here](docker/Dockerfile), and the specific image of the runtime you choose, which is generated through
@@ -62,3 +65,27 @@ You can specify the specific runtime you need to use through the image tags:
6265
| KDE | 5.15 | `kde-5.15` | `image: bilelmoussaoui/flatpak-github-actions:kde-5.15` |
6366
| elementary BaseApp | juno | `juno` | `image: bilelmoussaoui/flatpak-github-actions:elementary-juno` |
6467

68+
### Deployment stage
69+
70+
If you want to deploy the successfully built Flatpak application to a remote repository
71+
72+
```yaml
73+
on:
74+
push:
75+
branches: [main]
76+
name: Deploy
77+
jobs:
78+
flat-manager:
79+
name: "Flat Manager"
80+
runs-on: ubuntu-latest
81+
container:
82+
image: bilelmoussaoui/flatpak-github-actions:gnome-40
83+
options: --privileged
84+
steps:
85+
- uses: actions/checkout@v2
86+
- uses: bilelmoussaoui/flatpak-github-actions/flat-manager@master
87+
with:
88+
bundle: "palette.flatpak"
89+
remote-url: "org.gnome.zbrown.Palette.yml"
90+
token: ${{ secrets.FLAT_MANAGER }}
91+
```

flat-manager/Dockerfile

Whitespace-only changes.

flat-manager/action.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "flat-manager"
2+
description: "Deploy your Flatpak application to a repository"
3+
author: "Bilal Elmoussaoui"
4+
branding:
5+
icon: "package"
6+
color: "blue"
7+
inputs:
8+
bundle:
9+
description: "The bundle name, by default it's app.flatpak"
10+
required: false
11+
default: "app.flatpak"
12+
repository-url:
13+
description: >
14+
The repository used to fetch the runtime when the user downloads the
15+
Flatpak bundle.
16+
required: false
17+
default: "https://flathub.org/repo/flathub.flatpakrepo"
18+
repository-name:
19+
description: >
20+
The repository name to install the runtime from at build/install time.
21+
Note that the repository name corresponds to the `repository-url` mentioned above.
22+
required: false
23+
default: "flathub"
24+
runs:
25+
using: "node12"
26+
main: "dist/index.js"

flat-manager/index.js

Whitespace-only changes.
File renamed without changes.

0 commit comments

Comments
 (0)