Skip to content

Commit 0ff32da

Browse files
authored
Create merge.yml
1 parent c52e66a commit 0ff32da

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed

.github/workflows/merge.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
name: Merge
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
deploy_flatpak:
11+
name: Deploy Flatpak
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
arch: [x86_64, aarch64]
17+
# Don't fail the whole workflow if one architecture fails
18+
fail-fast: false
19+
20+
container:
21+
image: ghcr.io/elementary/flatpak-platform/runtime:8-${{ matrix.arch }}
22+
options: --privileged
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Set up QEMU for aarch64 emulation
29+
if: ${{ matrix.arch != 'x86_64' }}
30+
uses: docker/setup-qemu-action@v3
31+
with:
32+
platforms: arm64
33+
34+
- name: Install Rust SDK extension
35+
run: |
36+
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
37+
flatpak install -y --arch=${{matrix.arch}} org.freedesktop.Sdk.Extension.rust-stable//23.08
38+
39+
- name: Build
40+
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
41+
with:
42+
bundle: camera.flatpak
43+
manifest-path: io.github.ellie_commons.tomato.yml
44+
run-tests: true
45+
repository-name: appcenter
46+
repository-url: https://flatpak.elementary.io/repo.flatpakrepo
47+
cache-key: "flatpak-builder-${{ github.sha }}"
48+
branch: daily
49+
arch: ${{ matrix.arch }}
50+
51+
- name: Deploy
52+
uses: flatpak/flatpak-github-actions/flat-manager@v6
53+
with:
54+
repository: appcenter
55+
flat-manager-url: https://flatpak-api.elementary.io
56+
token: ${{ secrets.FLAT_MANAGER_TOKEN }}
57+
58+
gettext:
59+
name: Gettext
60+
runs-on: ubuntu-latest
61+
container:
62+
image: ghcr.io/elementary/flatpak-platform/runtime:8-x86_64
63+
options: --privileged
64+
65+
steps:
66+
- name: Install git, python3-git and jq
67+
run: |
68+
apt-get update
69+
apt-get install git jq python3-git -y
70+
71+
- name: Clone repository
72+
uses: actions/checkout@v4
73+
with:
74+
token: ${{ secrets.GIT_USER_TOKEN }}
75+
76+
- name: Install Rust SDK extension
77+
run: |
78+
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
79+
flatpak install -y org.freedesktop.Sdk.Extension.rust-stable//23.08
80+
81+
- name: Configure Git
82+
run: |
83+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
84+
- name: Update Translation Files
85+
uses: elementary/actions/gettext-flatpak@main
86+
with:
87+
manifest-path: 'io.github.ellie_commons.tomato.yml'
88+
env:
89+
GIT_USER_NAME: "elementaryBot"
90+
GIT_USER_EMAIL: "[email protected]"

0 commit comments

Comments
 (0)