Use larger GitHub actions workers (#661)
authorDavid Taylor <david@taylorhq.com>
Tue, 3 Jan 2023 16:36:36 +0000 (16:36 +0000)
committerGitHub <noreply@github.com>
Tue, 3 Jan 2023 16:36:36 +0000 (16:36 +0000)
Larger workers will be used for non-cron triggers to improve feedback-loop time when actively working on changes to the repository

.github/workflows/build.yml

index 65f9f07d5e3a40e5b5903198bce4d099cfbc629a..b785a65d62c50bd4f0d6718640706124b4266985 100644 (file)
@@ -6,9 +6,14 @@ on:
   schedule:
     - cron: '0 0 * * *'
 
+concurrency:
+  group: build-${{ format('{0}-{1}', github.head_ref || github.run_number, github.job) }}
+  cancel-in-progress: true
+
 jobs:
   base:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-20.04${{ ((github.event_name != 'schedule') && '-8core') || '' }}
+    timeout-minutes: 90
     steps:
       - name: enable experimental docker features
         run: |
@@ -54,7 +59,8 @@ jobs:
           docker push discourse/base:2.0.$TAG
           docker push discourse/base:release
   test:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-20.04${{ ((github.event_name != 'schedule') && '-8core') || '' }}
+    timeout-minutes: 30
     needs: base
     defaults:
       run:
@@ -94,7 +100,8 @@ jobs:
           docker push discourse/discourse_test:slim-browsers
           docker push discourse/discourse_test:release
   dev:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-20.04${{ ((github.event_name != 'schedule') && '-8core') || '' }}
+    timeout-minutes: 30
     needs: base
     steps:
       - uses: actions/checkout@v3