From 44ca4264835fafe483d9add17c3fc58a4099a708 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Mon, 17 Aug 2020 18:58:19 -0300 Subject: [PATCH] ci: Add experimental Flatpak bundle This is a simple, isolated workflow that generates Flatpak bundles when running on the master branch, or when a pull request has the "Seeking Testers" label. Based on https://github.com/marketplace/actions/flatpak-builder --- .github/workflows/flatpak.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/flatpak.yml diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml new file mode 100644 index 000000000..d327637ff --- /dev/null +++ b/.github/workflows/flatpak.yml @@ -0,0 +1,42 @@ +name: Flatpak (Experimental) + +on: + push: + paths-ignore: ['**.md'] + branches: [master] + pull_request: + paths-ignore: ['**.md'] + branches: [master] + +jobs: + flatpak_builder: + name: Bundle + runs-on: [ubuntu-latest] + container: + image: docker.io/bilelmoussaoui/flatpak-github-actions + 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@v2 + 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 -- GitLab