mirror of
https://github.com/RetroDECK/components-template.git
synced 2024-11-25 12:45:37 +00:00
Migrating to retrodeck-builder docker image
This commit is contained in:
parent
f9ba2cf8cf
commit
411ff68421
26
.github/workflows/build_artifacts.yml
vendored
26
.github/workflows/build_artifacts.yml
vendored
|
@ -38,9 +38,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
submodules: 'true'
|
submodules: 'true'
|
||||||
|
|
||||||
- name: "Install dependencies"
|
|
||||||
uses: RetroDECK/components-template/.github/workflows/install_dependencies.yml@main
|
|
||||||
|
|
||||||
- name: "Assembling manifest"
|
- name: "Assembling manifest"
|
||||||
if: ${{ env.DYNAMIC_MANIFEST == 'true' }}
|
if: ${{ env.DYNAMIC_MANIFEST == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
|
@ -63,13 +60,24 @@ jobs:
|
||||||
|
|
||||||
- name: "Build flatpak"
|
- name: "Build flatpak"
|
||||||
run: |
|
run: |
|
||||||
|
# Pull the Docker image
|
||||||
|
docker pull ghcr.io/retrodeck/retrodeck-builder:latest
|
||||||
|
|
||||||
|
# Configure Git
|
||||||
git config --global protocol.file.allow always
|
git config --global protocol.file.allow always
|
||||||
flatpak-builder --user --force-clean \
|
|
||||||
--install-deps-from=flathub \
|
# Run the flatpak build inside the Docker container
|
||||||
--install-deps-from=flathub-beta \
|
docker run --rm \
|
||||||
--repo="${GITHUB_WORKSPACE}/artifacts-repo" \
|
-v "${GITHUB_WORKSPACE}:/workspace" \ # Mount the workspace directory into the container
|
||||||
"${GITHUB_WORKSPACE}/artifacts-build-dir" \
|
-w /workspace \ # Set the working directory inside the container
|
||||||
"${{ env.MANIFEST_FILENAME }}"
|
ghcr.io/retrodeck/retrodeck-builder:latest \
|
||||||
|
--user --force-clean \
|
||||||
|
--install-deps-from=flathub \
|
||||||
|
--install-deps-from=flathub-beta \
|
||||||
|
--repo="/workspace/artifacts-repo" \
|
||||||
|
"/workspace/artifacts-build-dir" \
|
||||||
|
"${{ env.MANIFEST_FILENAME }}"
|
||||||
|
|
||||||
|
|
||||||
- name: "Exporting dir tree"
|
- name: "Exporting dir tree"
|
||||||
id: tree
|
id: tree
|
||||||
|
|
53
.github/workflows/install_dependencies.yml
vendored
53
.github/workflows/install_dependencies.yml
vendored
|
@ -1,53 +0,0 @@
|
||||||
name: "Install dependencies"
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
workflow_call:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
install-dependencies:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Clone repo
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: 'true'
|
|
||||||
|
|
||||||
- name: "Install dependencies"
|
|
||||||
run: |
|
|
||||||
echo "Starting dependency installation..."
|
|
||||||
|
|
||||||
# NOTE: this script is a copy and paste of automation_tools/install_dependencies.sh
|
|
||||||
# Please keep the original updated
|
|
||||||
|
|
||||||
unset pkg_mgr
|
|
||||||
|
|
||||||
# rpm-ostree must be checked before dnf because a dnf (wrapper) command also works on rpm-ostree distros (not what we want)
|
|
||||||
for potential_pkg_mgr in apt pacman rpm-ostree dnf; do
|
|
||||||
command -v "$potential_pkg_mgr" &> /dev/null && pkg_mgr="$potential_pkg_mgr" && break
|
|
||||||
done
|
|
||||||
|
|
||||||
case "$pkg_mgr" in
|
|
||||||
apt)
|
|
||||||
sudo add-apt-repository -y ppa:flatpak/stable
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y flatpak flatpak-builder p7zip-full xmlstarlet bzip2 curl jq
|
|
||||||
;;
|
|
||||||
pacman)
|
|
||||||
sudo pacman -Syu --noconfirm flatpak flatpak-builder p7zip xmlstarlet bzip2
|
|
||||||
;;
|
|
||||||
rpm-ostree)
|
|
||||||
echo "When using a distro with rpm-ostree, you shouldn't build directly on the host. Try using a distrobox."
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
dnf)
|
|
||||||
sudo dnf install -y flatpak flatpak-builder p7zip p7zip-plugins xmlstarlet bzip2 curl
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Package manager $pkg_mgr not supported. Please open an issue."
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
|
||||||
flatpak remote-add --user --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo
|
|
|
@ -1,33 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# This script is installing the required dependencies to correctly run the pipeline and build the flatpak
|
|
||||||
|
|
||||||
unset pkg_mgr
|
|
||||||
|
|
||||||
# rpm-ostree must be checked before dnf because a dnf (wrapper) command also works on rpm-ostree distros (not what we want)
|
|
||||||
for potential_pkg_mgr in apt pacman rpm-ostree dnf; do
|
|
||||||
command -v "$potential_pkg_mgr" &> /dev/null && pkg_mgr="$potential_pkg_mgr" && break
|
|
||||||
done
|
|
||||||
|
|
||||||
case "$pkg_mgr" in
|
|
||||||
apt)
|
|
||||||
sudo add-apt-repository -y ppa:flatpak/stable
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y flatpak flatpak-builder p7zip-full xmlstarlet bzip2 curl jq
|
|
||||||
;;
|
|
||||||
pacman)
|
|
||||||
sudo pacman -Syu --noconfirm flatpak flatpak-builder p7zip xmlstarlet bzip2
|
|
||||||
;;
|
|
||||||
rpm-ostree)
|
|
||||||
echo "When using a distro with rpm-ostree, you shouldn't build directly on the host. Try using a distrobox."
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
dnf)
|
|
||||||
sudo dnf install -y flatpak flatpak-builder p7zip p7zip-plugins xmlstarlet bzip2 curl
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Package manager $pkg_mgr not supported. Please open an issue."
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
|
||||||
flatpak remote-add --user --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo
|
|
Loading…
Reference in a new issue