mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-25 15:35:38 +00:00
Update main pipeline to reflect the changes in the cooker one [skip ci]
This commit is contained in:
parent
669a0b1159
commit
0ab1eaa24e
68
.github/workflows/main-selfhosted.yml
vendored
68
.github/workflows/main-selfhosted.yml
vendored
|
@ -30,30 +30,20 @@ jobs:
|
|||
run: sudo umount -f /home/ubuntu/actions-runner/_work/RetroDECK/RetroDECK/.flatpak-builder/rofiles/*
|
||||
continue-on-error: true
|
||||
|
||||
- name: Generate build ID
|
||||
id: generating_buildid
|
||||
run: echo "##[set-output name=build-id;]$(echo "$( git rev-parse --short HEAD )")"
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- name: Clone RetroDECK repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'true'
|
||||
|
||||
- name: Initialize enviornment
|
||||
- name: Initialize Flatpak environment
|
||||
run: |
|
||||
git pull
|
||||
git submodule init
|
||||
git submodule update
|
||||
sudo apt install -y flatpak flatpak-builder p7zip-full xmlstarlet bzip2
|
||||
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
flatpak install --user -y --noninteractive \
|
||||
org.kde.Sdk//6.3 \
|
||||
org.kde.Platform//6.3 \
|
||||
org.freedesktop.Platform.ffmpeg-full/x86_64/22.08 \
|
||||
io.qt.qtwebengine.BaseApp/x86_64/6.3 \
|
||||
org.freedesktop.Sdk.Extension.llvm13 \
|
||||
org.freedesktop.Sdk.Extension.dotnet6/x86_64/22.08 \
|
||||
runtime/org.freedesktop.Platform.ffmpeg-full/x86_64/22.08
|
||||
/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh # Run pre-build automation tasks
|
||||
|
||||
- name: Setting branch in the manifest
|
||||
- name: Run pre-build automation tasks
|
||||
run : "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh"
|
||||
|
||||
- name: Set branch in the manifest
|
||||
run: |
|
||||
sed -i "s/branch: THISBRANCH/branch: $(git rev-parse --abbrev-ref HEAD)/g" net.retrodeck.retrodeck.yml
|
||||
echo "Branch name is: $(git rev-parse --abbrev-ref HEAD)"
|
||||
|
@ -72,12 +62,47 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
- 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
|
||||
|
||||
# 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
|
||||
|
||||
- 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 ${GITHUB_WORKSPACE}/retrodeck-flatpak-main net.retrodeck.retrodeck.yml
|
||||
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
|
||||
run: |
|
||||
|
@ -111,7 +136,6 @@ jobs:
|
|||
bodyFile: "body.md"
|
||||
artifacts: "RetroDECK.flatpak,RetroDECK-Artifact.tar.gz"
|
||||
allowUpdates: true
|
||||
#prerelease: true
|
||||
makeLatest: true
|
||||
token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
|
||||
repo: RetroDECK
|
||||
|
@ -123,4 +147,4 @@ jobs:
|
|||
with:
|
||||
name: retrodeck-flatpak
|
||||
path: RetroDECK.flatpak
|
||||
continue-on-error: true
|
||||
continue-on-error: true
|
Loading…
Reference in a new issue