Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add upstream build for sunshine #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 26 additions & 11 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,24 @@ jobs:
strategy:
matrix:
image:
- { name: xorg, platforms: "linux/amd64,linux/arm64" }
- { name: pulseaudio, platforms: "linux/amd64,linux/arm64" }
- { name: udevd, platforms: "linux/amd64,linux/arm64" }
- { name: sunshine, platforms: "linux/amd64" }
- { name: retroarch, platforms: "linux/amd64,linux/arm64" }
- { name: steam, platforms: "linux/amd64" }
- name: xorg
platforms: "linux/amd64,linux/arm64"
- name: pulseaudio
platforms: "linux/amd64,linux/arm64"
- name: udevd
platforms: "linux/amd64,linux/arm64"
- name: sunshine
platforms: "linux/amd64"
- name: sunshine
tag_prefix: upstream-
platforms: "linux/amd64"
docker_build-args: |
SUNSHINE_SHA=master
GITHUB_API_FOR_CACHE=https://api.github.com/repos/loki-47-6F-64/sunshine/git/refs/heads/master
- name: retroarch
platforms: "linux/amd64,linux/arm64"
- name: steam
platforms: "linux/amd64"
fail-fast: false
steps:

Expand Down Expand Up @@ -54,10 +66,10 @@ jobs:
IMAGES="$IMAGES,ghcr.io/${REGISTRY_IMAGE}"
PUSH=true
echo ::set-output name=has_github_token::true
echo ::set-output name=cache_from::"type=registry,ref=${REGISTRY_IMAGE}:buildcache"
echo ::set-output name=cache_to::"type=registry,ref=${REGISTRY_IMAGE}:buildcache,mode=max"
echo ::set-output name=cache_from::"type=registry,ref=${REGISTRY_IMAGE}:${{ matrix.image.tag_prefix }}buildcache"
echo ::set-output name=cache_to::"type=registry,ref=${REGISTRY_IMAGE}:${{ matrix.image.tag_prefix }}buildcache,mode=max"
else
echo ::set-output name=cache_from::"type=registry,ref=${REGISTRY_IMAGE}:buildcache"
echo ::set-output name=cache_from::"type=registry,ref=${REGISTRY_IMAGE}:${{ matrix.image.tag_prefix }}buildcache"
echo ::set-output name=cache_to::""
fi

Expand All @@ -76,8 +88,10 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=edge,branch=master
type=sha
flavor: latest=auto #latest will point to last semver version (stable)
type=sha,prefix=${{ matrix.image.tag_prefix }}sha-
flavor: |
latest=auto
prefix=${{ matrix.image.tag_prefix }}

# Prepare for multi-arch
- name: Set up QEMU
Expand Down Expand Up @@ -120,6 +134,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
build-args: |
IMAGE_SOURCE=${{ steps.prep.outputs.github_server_url }}/${{ github.repository }}
${{ matrix.image.docker_build-args }}
cache-from: ${{ steps.prep.outputs.cache_from }}
cache-to: ${{ steps.prep.outputs.cache_to }}

Expand Down
4 changes: 4 additions & 0 deletions images/sunshine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends \
git ca-certificates apt-transport-https \
&& rm -rf /var/lib/apt/lists/*

# Avoid caching if status has changed - https://stackoverflow.com/questions/36996046/how-to-prevent-dockerfile-caching-git-clone
ARG GITHUB_API_FOR_CACHE /dev/null
ADD ${GITHUB_API_FOR_CACHE} version.json

RUN git clone https://github.com/loki-47-6F-64/sunshine.git && \
cd sunshine && \
# Fix the SHA commit
Expand Down