]> https://gitweb.dealii.org/ - code-gallery.git/commitdiff
github-actions: Only run scheduled jobs on main repository, and no longer on forks. 162/head
authorMarc Fehling <mafehling.git@gmail.com>
Thu, 28 Sep 2023 23:01:32 +0000 (17:01 -0600)
committerMarc Fehling <mafehling.git@gmail.com>
Thu, 28 Sep 2023 23:06:35 +0000 (17:06 -0600)
.github/workflows/linux.yml

index 78a70be33572f398f5fd61a5511b3437606f71f5..a6e3b861a8ef835a833dc51f7115deea7e40b4f7 100644 (file)
@@ -6,7 +6,7 @@ on:
   pull_request:
     branches: [ master ]
   schedule:
-  - cron: '0 0 * * 0'
+  - cron: '0 0 * * SUN'
 
 permissions:
   contents: read
@@ -14,6 +14,8 @@ permissions:
 
 jobs:
   build:
+    if: (github.event_name == 'schedule' && github.repository == 'dealii/code-gallery') || github.event_name != 'schedule'
+
     name: Build ${{ matrix.build_type }}-dealii:${{ matrix.dealii_version }}-${{ matrix.ubuntu_version }}
     runs-on: ubuntu-latest
 
@@ -74,7 +76,7 @@ jobs:
           numdiff solution-10.vtk test_data/reference-10.vtk
 
       - name: Create issue about failure
-        if: ${{ failure() && (github.event_name == 'schedule') && (github.repository_owner == 'dealii') }}
+        if: failure() && github.event_name == 'schedule'
         uses: JasonEtco/create-an-issue@v2.9.1
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.