mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-28 08:35:42 +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"
|
- name: "Build flatpak: download only"
|
||||||
id: "flatpak-download"
|
id: "flatpak-download"
|
||||||
run: |
|
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh"
|
||||||
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
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
# Sometimes flatpak download fails, in this case it tries a second time
|
# Sometimes flatpak download fails, in this case it tries a second time
|
||||||
- name: "Build flatpak: download only (retry)"
|
- name: "Build flatpak: download only (retry)"
|
||||||
if: steps.flatpak-download.outcome == 'failure'
|
if: steps.flatpak-download.outcome == 'failure'
|
||||||
run: |
|
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh"
|
||||||
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
|
|
||||||
|
|
||||||
- name: Build flatpak
|
- name: Build flatpak
|
||||||
run: |
|
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_only.sh"
|
||||||
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
|
|
||||||
|
|
||||||
- name: Create Artifact for flathub
|
- name: Create Artifact for flathub
|
||||||
run: |
|
run: |
|
||||||
|
@ -115,8 +85,7 @@ jobs:
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Create Bundle
|
- name: Create Bundle
|
||||||
run: |
|
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_bundle.sh"
|
||||||
flatpak build-bundle ${GITHUB_WORKSPACE}/local RetroDECK-cooker.flatpak net.retrodeck.retrodeck
|
|
||||||
|
|
||||||
- name: Set environment variable with current branch name
|
- name: Set environment variable with current branch name
|
||||||
run: echo "GITHUB_REF_SLUG=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
|
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)
|
- name: Check versions (main only)
|
||||||
id: check_version_string
|
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"
|
- name: "Build flatpak: download only"
|
||||||
id: "flatpak-download"
|
id: "flatpak-download"
|
||||||
run: |
|
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh"
|
||||||
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
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
# Sometimes flatpak download fails, in this case it tries a second time
|
# Sometimes flatpak download fails, in this case it tries a second time
|
||||||
- name: "Build flatpak: download only (retry)"
|
- name: "Build flatpak: download only (retry)"
|
||||||
if: steps.flatpak-download.outcome == 'failure'
|
if: steps.flatpak-download.outcome == 'failure'
|
||||||
run: |
|
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh"
|
||||||
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
|
|
||||||
|
|
||||||
- name: Build flatpak
|
- name: Build flatpak
|
||||||
run: |
|
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_only.sh"
|
||||||
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
|
|
||||||
|
|
||||||
- name: Create Artifact for flathub
|
- name: Create Artifact for flathub
|
||||||
run: |
|
run: |
|
||||||
|
@ -106,8 +79,7 @@ jobs:
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Create Bundle
|
- name: Create Bundle
|
||||||
run: |
|
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_bundle.sh"
|
||||||
flatpak build-bundle ${GITHUB_WORKSPACE}/local RetroDECK.flatpak net.retrodeck.retrodeck
|
|
||||||
|
|
||||||
- name: Getting version info
|
- name: Getting version info
|
||||||
id: version
|
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