mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-24 15:05:39 +00:00
Outsurcing pipeline commands in bash scripts [skip ci]
This commit is contained in:
parent
a193b41b12
commit
e315504be6
39
.github/workflows/cooker-selfhosted.yml
vendored
39
.github/workflows/cooker-selfhosted.yml
vendored
|
@ -65,46 +65,16 @@ jobs:
|
|||
|
||||
- name: "Build flatpak: download only"
|
||||
id: "flatpak-download"
|
||||
run: |
|
||||
git config --global protocol.file.allow always
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/local
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker
|
||||
flatpak-builder --user --force-clean \
|
||||
--install-deps-from=flathub \
|
||||
--install-deps-from=flathub-beta \
|
||||
--repo=${GITHUB_WORKSPACE}/local \
|
||||
--download-only \
|
||||
${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker \
|
||||
net.retrodeck.retrodeck.yml
|
||||
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh"
|
||||
continue-on-error: true
|
||||
|
||||
# Sometimes flatpak download fails, in this case it tries a second time
|
||||
- name: "Build flatpak: download only (retry)"
|
||||
if: steps.flatpak-download.outcome == 'failure'
|
||||
run: |
|
||||
git config --global protocol.file.allow always
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/local
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker
|
||||
flatpak-builder --user --force-clean \
|
||||
--install-deps-from=flathub \
|
||||
--install-deps-from=flathub-beta \
|
||||
--repo=${GITHUB_WORKSPACE}/local \
|
||||
--download-only \
|
||||
${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker \
|
||||
net.retrodeck.retrodeck.yml
|
||||
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh"
|
||||
|
||||
- name: Build flatpak
|
||||
run: |
|
||||
git config --global protocol.file.allow always
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/local
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker
|
||||
flatpak-builder --user --force-clean \
|
||||
--install-deps-from=flathub \
|
||||
--install-deps-from=flathub-beta \
|
||||
--repo=${GITHUB_WORKSPACE}/local \
|
||||
--disable-download \
|
||||
${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker \
|
||||
net.retrodeck.retrodeck.yml
|
||||
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_only.sh"
|
||||
|
||||
- name: Create Artifact for flathub
|
||||
run: |
|
||||
|
@ -115,8 +85,7 @@ jobs:
|
|||
continue-on-error: true
|
||||
|
||||
- name: Create Bundle
|
||||
run: |
|
||||
flatpak build-bundle ${GITHUB_WORKSPACE}/local RetroDECK-cooker.flatpak net.retrodeck.retrodeck
|
||||
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_bundle.sh"
|
||||
|
||||
- name: Set environment variable with current branch name
|
||||
run: echo "GITHUB_REF_SLUG=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
|
||||
|
|
44
.github/workflows/main-selfhosted.yml
vendored
44
.github/workflows/main-selfhosted.yml
vendored
|
@ -52,50 +52,23 @@ jobs:
|
|||
|
||||
- name: Check versions (main only)
|
||||
id: check_version_string
|
||||
run: "automation_tools/version_checker.sh"
|
||||
run: "automation_tools/main_version_checker.sh"
|
||||
|
||||
- name: "[DEBUG] Outputting manifest"
|
||||
run: cat net.retrodeck.retrodeck.yml
|
||||
|
||||
- name: "Build flatpak: download only"
|
||||
id: "flatpak-download"
|
||||
run: |
|
||||
git config --global protocol.file.allow always
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/local
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker
|
||||
flatpak-builder --user --force-clean \
|
||||
--install-deps-from=flathub \
|
||||
--install-deps-from=flathub-beta \
|
||||
--repo=${GITHUB_WORKSPACE}/local \
|
||||
--download-only \
|
||||
${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker \
|
||||
net.retrodeck.retrodeck.yml
|
||||
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh"
|
||||
continue-on-error: true
|
||||
|
||||
# Sometimes flatpak download fails, in this case it tries a second time
|
||||
- name: "Build flatpak: download only (retry)"
|
||||
if: steps.flatpak-download.outcome == 'failure'
|
||||
run: |
|
||||
git config --global protocol.file.allow always
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/local
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker
|
||||
flatpak-builder --user --force-clean \
|
||||
--install-deps-from=flathub \
|
||||
--install-deps-from=flathub-beta \
|
||||
--repo=${GITHUB_WORKSPACE}/local \
|
||||
--download-only \
|
||||
${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker \
|
||||
net.retrodeck.retrodeck.yml
|
||||
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh"
|
||||
|
||||
- name: Build flatpak
|
||||
run: |
|
||||
git config --global protocol.file.allow always
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/local
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker
|
||||
flatpak-builder --user --force-clean \
|
||||
--install-deps-from=flathub \
|
||||
--install-deps-from=flathub-beta \
|
||||
--repo=${GITHUB_WORKSPACE}/local \
|
||||
--disable-download \
|
||||
${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker \
|
||||
net.retrodeck.retrodeck.yml
|
||||
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_only.sh"
|
||||
|
||||
- name: Create Artifact for flathub
|
||||
run: |
|
||||
|
@ -106,8 +79,7 @@ jobs:
|
|||
continue-on-error: true
|
||||
|
||||
- name: Create Bundle
|
||||
run: |
|
||||
flatpak build-bundle ${GITHUB_WORKSPACE}/local RetroDECK.flatpak net.retrodeck.retrodeck
|
||||
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_bundle.sh"
|
||||
|
||||
- name: Getting version info
|
||||
id: version
|
||||
|
|
0
automation_tools/cooker_flatpak_portal_add.sh
Normal file → Executable file
0
automation_tools/cooker_flatpak_portal_add.sh
Normal file → Executable file
5
automation_tools/flatpak_build_bundle.sh
Executable file
5
automation_tools/flatpak_build_bundle.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This is building the bundle RetroDECK.flatpak after the download and build steps are done
|
||||
|
||||
flatpak build-bundle ${GITHUB_WORKSPACE}/local RetroDECK-cooker.flatpak net.retrodeck.retrodeck
|
14
automation_tools/flatpak_build_download_only.sh
Executable file
14
automation_tools/flatpak_build_download_only.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This script is downloading the needed files to prepare the manifest build
|
||||
|
||||
git config --global protocol.file.allow always
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/local
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker
|
||||
flatpak-builder --user --force-clean \
|
||||
--install-deps-from=flathub \
|
||||
--install-deps-from=flathub-beta \
|
||||
--repo=${GITHUB_WORKSPACE}/local \
|
||||
--download-only \
|
||||
${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker \
|
||||
net.retrodeck.retrodeck.yml
|
14
automation_tools/flatpak_build_only.sh
Executable file
14
automation_tools/flatpak_build_only.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This script is building the flatpak is the needed files are already downloaded
|
||||
|
||||
git config --global protocol.file.allow always
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/local
|
||||
mkdir -vp ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker
|
||||
flatpak-builder --user --force-clean \
|
||||
--install-deps-from=flathub \
|
||||
--install-deps-from=flathub-beta \
|
||||
--repo=${GITHUB_WORKSPACE}/local \
|
||||
--disable-download \
|
||||
${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker \
|
||||
net.retrodeck.retrodeck.yml
|
0
automation_tools/force_update_submodules.sh
Normal file → Executable file
0
automation_tools/force_update_submodules.sh
Normal file → Executable file
Loading…
Reference in a new issue