mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-20 05:01:51 -04:00
The flatpak-builder tool now supports passing secrets options to the build system. These options are not printed during the build, nor added to the resolved manifest after build, so they don't leak env vars from CI. Make secret variables part of the Flatpak workflow environment, like the main workflow. Pass the various services hashes and clientids to the build system using the new "secret-opts" key.
54 lines
1.9 KiB
YAML
54 lines
1.9 KiB
YAML
name: Flatpak (Experimental)
|
|
|
|
on:
|
|
push:
|
|
paths-ignore: ['**.md']
|
|
branches: [master]
|
|
pull_request:
|
|
paths-ignore: ['**.md']
|
|
branches: [master]
|
|
|
|
env:
|
|
TWITCH_CLIENTID: ${{ secrets.TWITCH_CLIENT_ID }}
|
|
TWITCH_HASH: ${{ secrets.TWITCH_HASH }}
|
|
RESTREAM_CLIENTID: ${{ secrets.RESTREAM_CLIENTID }}
|
|
RESTREAM_HASH: ${{ secrets.RESTREAM_HASH }}
|
|
YOUTUBE_CLIENTID: ${{ secrets.YOUTUBE_CLIENTID }}
|
|
YOUTUBE_CLIENTID_HASH: ${{ secrets.YOUTUBE_CLIENTID_HASH }}
|
|
YOUTUBE_SECRET: ${{ secrets.YOUTUBE_SECRET }}
|
|
YOUTUBE_SECRET_HASH: ${{ secrets.YOUTUBE_SECRET_HASH }}
|
|
|
|
jobs:
|
|
flatpak_builder:
|
|
name: Bundle
|
|
runs-on: [ubuntu-latest]
|
|
container:
|
|
image: bilelmoussaoui/flatpak-github-actions:kde-5.15-21.08
|
|
options: --privileged
|
|
steps:
|
|
- name: 'Check for Github Labels'
|
|
if: github.event_name == 'pull_request'
|
|
shell: bash
|
|
run: |
|
|
LABELS_URL="$(echo ${{ github.event.pull_request.url }} | sed s'/pulls/issues/')"
|
|
LABEL_FOUND="$(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "${LABELS_URL}/labels" | sed -n 's/.*"name": "\(.*\)",/\1/p' | grep 'Seeking Testers' || true)"
|
|
if [ "${LABEL_FOUND}" = "Seeking Testers" ]; then
|
|
echo "SEEKING_TESTERS=1" >> $GITHUB_ENV
|
|
else
|
|
echo "SEEKING_TESTERS=0" >> $GITHUB_ENV
|
|
fi
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v2.3.3
|
|
if: success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1')
|
|
with:
|
|
submodules: 'recursive'
|
|
|
|
- name: Build Flatpak Manifest
|
|
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v3
|
|
if: success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1')
|
|
with:
|
|
bundle: obs-studio-${{ github.sha }}.flatpak
|
|
manifest-path: CI/flatpak/com.obsproject.Studio.json
|
|
cache-key: flatpak-builder-${{ github.sha }}
|