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:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
34
.github/workflows/cooker-selfhosted.yml
vendored
34
.github/workflows/cooker-selfhosted.yml
vendored
|
@ -1,23 +1,23 @@
|
||||||
name: "Build cooker"
|
name: "Build cooker"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
# push:
|
||||||
branches:
|
# branches:
|
||||||
- cooker*
|
# - cooker*
|
||||||
- feat*
|
# - feat*
|
||||||
paths:
|
# paths:
|
||||||
- '.github/workflows/**'
|
# - '.github/workflows/**'
|
||||||
- 'automation_tools/**'
|
# - 'automation_tools/**'
|
||||||
- 'emu-configs/**'
|
# - 'emu-configs/**'
|
||||||
- 'es-configs/**'
|
# - 'es-configs/**'
|
||||||
- 'functions/**'
|
# - 'functions/**'
|
||||||
- 'rd-submodules/**'
|
# - 'rd-submodules/**'
|
||||||
- '*.sh'
|
# - '*.sh'
|
||||||
- 'net.retrodeck.retrodeck.yml'
|
# - 'net.retrodeck.retrodeck.yml'
|
||||||
- 'net.retrodeck.retrodeck.appdata.xml'
|
# - 'net.retrodeck.retrodeck.appdata.xml'
|
||||||
pull_request:
|
# pull_request:
|
||||||
branches:
|
# branches:
|
||||||
- cooker*
|
# - cooker*
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,18 @@
|
||||||
|
|
||||||
# This is building the bundle RetroDECK.flatpak after the download and build steps are done
|
# 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
|
if [ "${GITHUB_REF##*/}" = "main" ]; then
|
||||||
flatpak build-bundle ${GITHUB_WORKSPACE}/.local RetroDECK.flatpak net.retrodeck.retrodeck
|
flatpak build-bundle ${GITHUB_WORKSPACE}/.local RetroDECK.flatpak net.retrodeck.retrodeck
|
||||||
else
|
else
|
||||||
flatpak build-bundle ${GITHUB_WORKSPACE}/.local RetroDECK-cooker.flatpak net.retrodeck.retrodeck
|
flatpak build-bundle ${GITHUB_WORKSPACE}/.local RetroDECK-cooker.flatpak net.retrodeck.retrodeck
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $PERSISTENCE==true ]; then
|
||||||
|
GITHUB_WORKSPACE="$GITHUB_WORKSPACE_BACKUP"
|
||||||
|
fi
|
|
@ -12,6 +12,12 @@ else
|
||||||
FOLDER=retrodeck-flatpak-cooker
|
FOLDER=retrodeck-flatpak-cooker
|
||||||
fi
|
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}
|
mkdir -vp "${GITHUB_WORKSPACE}"/{local,retrodeck-flatpak-cooker}
|
||||||
|
|
||||||
flatpak-builder --user --force-clean \
|
flatpak-builder --user --force-clean \
|
||||||
|
@ -21,3 +27,7 @@ flatpak-builder --user --force-clean \
|
||||||
--download-only \
|
--download-only \
|
||||||
"${GITHUB_WORKSPACE}/${FOLDER}" \
|
"${GITHUB_WORKSPACE}/${FOLDER}" \
|
||||||
net.retrodeck.retrodeck.yml
|
net.retrodeck.retrodeck.yml
|
||||||
|
|
||||||
|
if [ $PERSISTENCE==true ]; then
|
||||||
|
GITHUB_WORKSPACE="$GITHUB_WORKSPACE_BACKUP"
|
||||||
|
fi
|
||||||
|
|
|
@ -12,6 +12,12 @@ else
|
||||||
FOLDER=retrodeck-flatpak-cooker
|
FOLDER=retrodeck-flatpak-cooker
|
||||||
fi
|
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}/.local
|
||||||
mkdir -vp ${GITHUB_WORKSPACE}/"$FOLDER"
|
mkdir -vp ${GITHUB_WORKSPACE}/"$FOLDER"
|
||||||
|
|
||||||
|
@ -22,3 +28,7 @@ flatpak-builder --user --force-clean \
|
||||||
--disable-download \
|
--disable-download \
|
||||||
${GITHUB_WORKSPACE}/"$FOLDER" \
|
${GITHUB_WORKSPACE}/"$FOLDER" \
|
||||||
net.retrodeck.retrodeck.yml
|
net.retrodeck.retrodeck.yml
|
||||||
|
|
||||||
|
if [ $PERSISTENCE==true ]; then
|
||||||
|
GITHUB_WORKSPACE="$GITHUB_WORKSPACE_BACKUP"
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue