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