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
66
.github/workflows/main-selfhosted.yml
vendored
66
.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/*
|
run: sudo umount -f /home/ubuntu/actions-runner/_work/RetroDECK/RetroDECK/.flatpak-builder/rofiles/*
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Generate build ID
|
- name: Clone RetroDECK repo
|
||||||
id: generating_buildid
|
uses: actions/checkout@v3
|
||||||
run: echo "##[set-output name=build-id;]$(echo "$( git rev-parse --short HEAD )")"
|
with:
|
||||||
|
submodules: 'true'
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- name: Initialize Flatpak environment
|
||||||
|
|
||||||
- name: Initialize enviornment
|
|
||||||
run: |
|
run: |
|
||||||
git pull
|
|
||||||
git submodule init
|
|
||||||
git submodule update
|
|
||||||
sudo apt install -y flatpak flatpak-builder p7zip-full xmlstarlet bzip2
|
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 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: |
|
run: |
|
||||||
sed -i "s/branch: THISBRANCH/branch: $(git rev-parse --abbrev-ref HEAD)/g" net.retrodeck.retrodeck.yml
|
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)"
|
echo "Branch name is: $(git rev-parse --abbrev-ref HEAD)"
|
||||||
|
@ -72,12 +62,47 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
- name: Build flatpak
|
||||||
run: |
|
run: |
|
||||||
git config --global protocol.file.allow always
|
git config --global protocol.file.allow always
|
||||||
mkdir -vp ${GITHUB_WORKSPACE}/local
|
mkdir -vp ${GITHUB_WORKSPACE}/local
|
||||||
mkdir -vp ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker
|
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
|
- name: Create Artifact for flathub
|
||||||
run: |
|
run: |
|
||||||
|
@ -111,7 +136,6 @@ jobs:
|
||||||
bodyFile: "body.md"
|
bodyFile: "body.md"
|
||||||
artifacts: "RetroDECK.flatpak,RetroDECK-Artifact.tar.gz"
|
artifacts: "RetroDECK.flatpak,RetroDECK-Artifact.tar.gz"
|
||||||
allowUpdates: true
|
allowUpdates: true
|
||||||
#prerelease: true
|
|
||||||
makeLatest: true
|
makeLatest: true
|
||||||
token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
|
token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
|
||||||
repo: RetroDECK
|
repo: RetroDECK
|
||||||
|
|
Loading…
Reference in a new issue