-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flatpak: use a VM to build the package bundle
In order to be able to test the package, we need to build the image outside of a Docker container. Both snap and flatpak cannot run correctly inside a Docker container. So, stop using Gitlab to build the flatpak bundle. Signed-off-by: Claudio André <[email protected]>
- Loading branch information
1 parent
c9c5561
commit e34a072
Showing
1 changed file
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
############################################################################### | ||
# _ _ _ _ _____ _ | ||
# | | | | | | | | | __ \(_) | ||
# | | ___ | |__ _ __ | |_| |__ ___ | |__) |_ _ __ _ __ ___ _ __ | ||
# _ | |/ _ \| '_ \| '_ \ | __| '_ \ / _ \ | _ /| | '_ \| '_ \ / _ \ '__| | ||
# | |__| | (_) | | | | | | | | |_| | | | __/ | | \ \| | |_) | |_) | __/ | | ||
# \____/ \___/|_| |_|_| |_| \__|_| |_|\___| |_| \_\_| .__/| .__/ \___|_| | ||
# | | | | | ||
# |_| |_| | ||
# | ||
# Copyright (c) 2024 Claudio André <[email protected]> | ||
# | ||
# This program comes with ABSOLUTELY NO WARRANTY; express or implied. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, as expressed in version 2, seen at | ||
# http://www.gnu.org/licenses/gpl-2.0.html | ||
############################################################################### | ||
# GitHub Action to build John the Ripper's flatpak bundle | ||
# More info at https://github.com/openwall/john-packages | ||
|
||
--- | ||
name: Flatpak Bundle | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
push: | ||
branches: | ||
- "flatpak" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: Build bundle | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | ||
with: | ||
disable-sudo: false | ||
egress-policy: audit | ||
|
||
- name: Check out the repo | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
|
||
- name: Get data | ||
id: data | ||
run: | | ||
#TODO: edit before release (JUMBO_RELEASE) | ||
{ | ||
echo "now=$(date -u)" | ||
echo "revision=$(git rev-parse --short=7 HEAD 2>/dev/null)" | ||
echo "version=1.9.$(date +%Y%m%d)" | ||
} >> "$GITHUB_OUTPUT" | ||
- name: Dependencies | ||
run: | | ||
sudo apt-get update -yq | ||
sudo apt-get install -y flatpak | ||
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo | ||
- name: Build | ||
run: | | ||
wget https://github.com/openwall/john-packages/archive/refs/heads/release.zip -O main.zip #TODO undo Me | ||
unzip main.zip | ||
cp -r tests/ john-packages-release/deploy/ #TODO undo Me | ||
# To build the package, go to the place the recipe lives | ||
cd john-packages-release/deploy/flatpak | ||
export DISPLAY=:0.0 | ||
flatpak install -y --user flathub org.flatpak.Builder | ||
flatpak-builder --force-clean --sandbox --user --install --install-deps-from=flathub --ccache --mirror-screenshots-url=https://dl.flathub.org/media/ --repo=repo builddir com.openwall.John.json | ||
flatpak run com.openwall.John | ||
ls ../.. -lR | ||
sha256sum john.flatpak || true | ||
flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest com.openwall.John.json | ||
flatpak run --command=flatpak-builder-lint org.flatpak.Builder repo repo | ||
shell: bash | ||
|
||
- name: 'Upload Artifact' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: bundle | ||
path: john.flatpak | ||
retention-days: 15 |