From 0d152167611ea2044f4dc5a5074744ca4fd9f3eb Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 26 Nov 2021 04:28:00 +0100 Subject: [PATCH] ci: Don't perform tasks relying on secrets in pull requests --- .github/workflows/main.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e765723e..e7b72197 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,6 +42,7 @@ jobs: submodules: recursive fetch-depth: 0 - name: "libobs: Cache" + if: ${{ github.event_name != 'pull_request' }} uses: actions/cache@v2 with: path: | @@ -50,6 +51,7 @@ jobs: build/temp/libobs-src key: libobs-${{ matrix.id }}-${{ env.OBS_VERSION }}-${{ env.DOWNLOAD_OBS_HASH }}-${{ secrets.CACHE_VERSION }} - name: "obsdeps: Cache" + if: ${{ github.event_name != 'pull_request' }} uses: actions/cache@v2 with: path: | @@ -58,6 +60,7 @@ jobs: build/temp/obsdeps-src key: obsdeps-${{ matrix.id }}-${{ env.OBSDEPS_VERSION }}-${{ env.DOWNLOAD_OBSDEPS_HASH }}-${{ secrets.CACHE_VERSION }} - name: "qt: Cache" + if: ${{ github.event_name != 'pull_request' }} uses: actions/cache@v2 with: path: | @@ -66,6 +69,7 @@ jobs: build/temp/qt-src key: qt-${{ matrix.id }}-${{ env.OBSDEPS_VERSION }}-${{ env.QT_VERSION }}-${{ secrets.CACHE_VERSION }} - name: "libaom: Cache" + if: ${{ github.event_name != 'pull_request' }} uses: actions/cache@v2 id: libaom-cache with: @@ -80,7 +84,7 @@ jobs: curl -L -o "aom.7z" "https://github.com/Xaymar/aom/releases/download/v${{ env.LIBAOM_VERSION }}/aom-windows-64-shared.7z" 7z x -y -o"build/libaom/" "aom.7z" - name: "Code Signing" - if: ${{ github.repository_owner == 'Xaymar' }} + if: ${{ github.event_name != 'pull_request' }} id: codesign shell: bash run: | @@ -122,7 +126,7 @@ jobs: cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP - name: "StreamFX: Signed Installer Preparation" - if: ${{ github.repository_owner == 'Xaymar' }} + if: ${{ github.event_name != 'pull_request' }} id: codesign_install shell: bash run: | @@ -192,6 +196,7 @@ jobs: libcurl4-openssl-dev ${{ matrix.extra_command }} - name: "libobs: Cache" + if: ${{ github.event_name != 'pull_request' }} uses: actions/cache@v2 with: path: | @@ -247,6 +252,7 @@ jobs: submodules: recursive fetch-depth: 0 - name: "libobs: Cache" + if: ${{ github.event_name != 'pull_request' }} uses: actions/cache@v2 with: path: | @@ -255,6 +261,7 @@ jobs: build/temp/libobs-src key: libobs-${{ matrix.id }}-${{ env.OBS_VERSION }}-${{ env.DOWNLOAD_OBS_HASH }}-${{ secrets.CACHE_VERSION }} - name: "obsdeps: Cache" + if: ${{ github.event_name != 'pull_request' }} uses: actions/cache@v2 with: path: | @@ -263,6 +270,7 @@ jobs: build/temp/obsdeps-src key: obsdeps-${{ matrix.id }}-${{ env.OBSDEPS_VERSION }}-${{ env.DOWNLOAD_OBSDEPS_HASH }}-${{ secrets.CACHE_VERSION }} - name: "qt: Cache" + if: ${{ github.event_name != 'pull_request' }} uses: actions/cache@v2 id: qt-cache with: