mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-03-30 07:20:52 +00:00
Fix flatpak CI for outside pull requests
This commit is contained in:
parent
1415c8b200
commit
fd0dc9ab8e
16
.github/workflows/CI.yml
vendored
16
.github/workflows/CI.yml
vendored
@ -195,33 +195,29 @@ jobs:
|
||||
- name: Configure Flatpak Manifest
|
||||
run: |
|
||||
# variables for manifest
|
||||
owner=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]' )
|
||||
repo=$(echo ${GITHUB_REPOSITORY#*/} | tr '[:upper:]' '[:lower:]' )
|
||||
branch=${GITHUB_HEAD_REF}
|
||||
commit=${{ github.event.pull_request.head.sha }}
|
||||
|
||||
# check the branch variable
|
||||
if [ -z "$branch" ]
|
||||
then
|
||||
echo "This is a PUSH event"
|
||||
branch=branch=${{ github.ref_name }}
|
||||
branch=${{ github.ref_name }}
|
||||
commit=${{ github.sha }}
|
||||
clone_url=${{ github.event.repository.clone_url }}
|
||||
else
|
||||
echo "This is a PR event"
|
||||
commit=${{ github.event.pull_request.head.sha }}
|
||||
clone_url=${{ github.event.pull_request.head.repo.clone_url }}
|
||||
fi
|
||||
echo "Owner: ${owner}"
|
||||
echo "Repo: ${repo}"
|
||||
echo "Branch: ${branch}"
|
||||
echo "Commit: ${commit}"
|
||||
echo "Clone URL: ${clone_url}"
|
||||
|
||||
mkdir -p build
|
||||
mkdir -p artifacts
|
||||
|
||||
cd build
|
||||
cmake -DGITHUB_OWNER=${owner} -DGITHUB_REPO=${repo} -DGITHUB_BRANCH=${branch} -DSUNSHINE_CONFIGURE_FLATPAK=ON -DSUNSHINE_CONFIGURE_ONLY=ON ..
|
||||
|
||||
# add the commit
|
||||
echo " commit: ${commit}" >> ./com.github.sunshinestream.sunshine.yml
|
||||
cmake -DGITHUB_CLONE_URL=${clone_url} -DGITHUB_BRANCH=${branch} -DGITHUB_COMMIT=${commit} -DSUNSHINE_CONFIGURE_FLATPAK=ON -DSUNSHINE_CONFIGURE_ONLY=ON ..
|
||||
|
||||
- name: Build Linux Flatpak
|
||||
working-directory: build
|
||||
|
@ -206,5 +206,6 @@ modules:
|
||||
- -DSUNSHINE_ENABLE_CUDA=ON
|
||||
sources:
|
||||
- type: git
|
||||
url: https://github.com/@GITHUB_OWNER@/@GITHUB_REPO@.git
|
||||
url: @GITHUB_CLONE_URL@
|
||||
branch: @GITHUB_BRANCH@
|
||||
commit: @GITHUB_COMMIT@
|
||||
|
Loading…
x
Reference in New Issue
Block a user