mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-24 15:05:39 +00:00
WORKFLOW: making the automated cooker builder persistent
This commit is contained in:
parent
02c4eccc1d
commit
2fcaa063e4
|
@ -1,4 +1,7 @@
|
|||
name: "Build cooker"
|
||||
name: "Build cooker (persistent)"
|
||||
|
||||
env:
|
||||
PERSISTENCE: true
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
34
.github/workflows/cooker-selfhosted.yml
vendored
34
.github/workflows/cooker-selfhosted.yml
vendored
|
@ -1,23 +1,23 @@
|
|||
name: "Build cooker"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- cooker*
|
||||
- feat*
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'automation_tools/**'
|
||||
- 'emu-configs/**'
|
||||
- 'es-configs/**'
|
||||
- 'functions/**'
|
||||
- 'rd-submodules/**'
|
||||
- '*.sh'
|
||||
- 'net.retrodeck.retrodeck.yml'
|
||||
- 'net.retrodeck.retrodeck.appdata.xml'
|
||||
pull_request:
|
||||
branches:
|
||||
- cooker*
|
||||
# push:
|
||||
# branches:
|
||||
# - cooker*
|
||||
# - feat*
|
||||
# paths:
|
||||
# - '.github/workflows/**'
|
||||
# - 'automation_tools/**'
|
||||
# - 'emu-configs/**'
|
||||
# - 'es-configs/**'
|
||||
# - 'functions/**'
|
||||
# - 'rd-submodules/**'
|
||||
# - '*.sh'
|
||||
# - 'net.retrodeck.retrodeck.yml'
|
||||
# - 'net.retrodeck.retrodeck.appdata.xml'
|
||||
# pull_request:
|
||||
# branches:
|
||||
# - cooker*
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
|
|
|
@ -2,8 +2,18 @@
|
|||
|
||||
# This is building the bundle RetroDECK.flatpak after the download and build steps are done
|
||||
|
||||
if [ $PERSISTENCE==true ]; then
|
||||
mkdir -p "$HOME/cooker-persistent"
|
||||
GITHUB_WORKSPACE_BACKUP="$GITHUB_WORKSPACE"
|
||||
GITHUB_WORKSPACE="$HOME/cooker-persistent"
|
||||
fi
|
||||
|
||||
if [ "${GITHUB_REF##*/}" = "main" ]; then
|
||||
flatpak build-bundle ${GITHUB_WORKSPACE}/.local RetroDECK.flatpak net.retrodeck.retrodeck
|
||||
else
|
||||
flatpak build-bundle ${GITHUB_WORKSPACE}/.local RetroDECK-cooker.flatpak net.retrodeck.retrodeck
|
||||
fi
|
||||
|
||||
if [ $PERSISTENCE==true ]; then
|
||||
GITHUB_WORKSPACE="$GITHUB_WORKSPACE_BACKUP"
|
||||
fi
|
|
@ -12,6 +12,12 @@ else
|
|||
FOLDER=retrodeck-flatpak-cooker
|
||||
fi
|
||||
|
||||
if [ $PERSISTENCE==true ]; then
|
||||
mkdir -p "$HOME/cooker-persistent"
|
||||
GITHUB_WORKSPACE_BACKUP="$GITHUB_WORKSPACE"
|
||||
GITHUB_WORKSPACE="$HOME/cooker-persistent"
|
||||
fi
|
||||
|
||||
mkdir -vp "${GITHUB_WORKSPACE}"/{local,retrodeck-flatpak-cooker}
|
||||
|
||||
flatpak-builder --user --force-clean \
|
||||
|
@ -21,3 +27,7 @@ flatpak-builder --user --force-clean \
|
|||
--download-only \
|
||||
"${GITHUB_WORKSPACE}/${FOLDER}" \
|
||||
net.retrodeck.retrodeck.yml
|
||||
|
||||
if [ $PERSISTENCE==true ]; then
|
||||
GITHUB_WORKSPACE="$GITHUB_WORKSPACE_BACKUP"
|
||||
fi
|
||||
|
|
|
@ -12,6 +12,12 @@ else
|
|||
FOLDER=retrodeck-flatpak-cooker
|
||||
fi
|
||||
|
||||
if [ $PERSISTENCE==true ]; then
|
||||
mkdir -p "$HOME/cooker-persistent"
|
||||
GITHUB_WORKSPACE_BACKUP="$GITHUB_WORKSPACE"
|
||||
GITHUB_WORKSPACE="$HOME/cooker-persistent"
|
||||
fi
|
||||
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/.local
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/"$FOLDER"
|
||||
|
||||
|
@ -22,3 +28,7 @@ flatpak-builder --user --force-clean \
|
|||
--disable-download \
|
||||
${GITHUB_WORKSPACE}/"$FOLDER" \
|
||||
net.retrodeck.retrodeck.yml
|
||||
|
||||
if [ $PERSISTENCE==true ]; then
|
||||
GITHUB_WORKSPACE="$GITHUB_WORKSPACE_BACKUP"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue