You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2026/09/11 12:13:03 UTC

(camel-quarkus) branch main updated: Use ubuntu-slim runners for lightweight GitHub Actions workflows

This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new b0ad3e9f1c Use ubuntu-slim runners for lightweight GitHub Actions workflows
b0ad3e9f1c is described below

commit b0ad3e9f1c70d55d9ae57c5ca4f9f8ff54b0aef6
Author: James Netherton <ja...@users.noreply.github.com>
AuthorDate: Fri Sep 11 13:12:57 2026 +0100

    Use ubuntu-slim runners for lightweight GitHub Actions workflows
    
    Runner availability for Apache projects is often exhausted, so switch the
    short-lived issue labelling, milestone, docs validation and dependabot
    branch synchronization jobs to the 1 vCPU ubuntu-slim runner. Each of these
    jobs completes in well under the 15 minute ubuntu-slim limit.
    
    ubuntu-slim does not provide yarn, so the docs validation job installs the
    same version that ubuntu-latest provides.
    
    The dependabot branch synchronization job no longer hard codes
    /home/runner/work paths, and uses RUNNER_TEMP instead.
    
    Co-authored-by: Claude Opus 5 (1M context) <no...@anthropic.com>
---
 .github/workflows/assign-issue-milestone.yaml      |  2 +-
 .../workflows/assign-wontfix-issue-milestone.yaml  |  2 +-
 .github/workflows/label-issue.yaml                 |  2 +-
 .github/workflows/pr-doc-validation.yml            |  5 ++++-
 .../workflows/synchronize-dependabot-branch.yaml   | 24 ++++++++++++----------
 5 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/assign-issue-milestone.yaml b/.github/workflows/assign-issue-milestone.yaml
index 6c58d22699..72747221a7 100644
--- a/.github/workflows/assign-issue-milestone.yaml
+++ b/.github/workflows/assign-issue-milestone.yaml
@@ -32,7 +32,7 @@ permissions:
 jobs:
   assign-issue-milestone:
     if: github.repository == 'apache/camel-quarkus'
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-slim
     steps:
       - name: Assign Closed Issues To Latest Milestone
         uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
diff --git a/.github/workflows/assign-wontfix-issue-milestone.yaml b/.github/workflows/assign-wontfix-issue-milestone.yaml
index 2482aa2b59..2e6fcfdc5f 100644
--- a/.github/workflows/assign-wontfix-issue-milestone.yaml
+++ b/.github/workflows/assign-wontfix-issue-milestone.yaml
@@ -30,7 +30,7 @@ jobs:
     if: github.repository == 'apache/camel-quarkus' &&
         github.event_name == 'issues' &&
         github.event.issue.milestone.number != 4 && (contains(github.event.issue.labels.*.name, 'wontfix') || github.event.issue.state_reason == 'not_planned')
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-slim
     concurrency:
       group: assign-wont-fix-issue-milestone-${{ github.event.issue.number }}
       cancel-in-progress: true
diff --git a/.github/workflows/label-issue.yaml b/.github/workflows/label-issue.yaml
index 37f98800f2..0002a60d4e 100644
--- a/.github/workflows/label-issue.yaml
+++ b/.github/workflows/label-issue.yaml
@@ -38,7 +38,7 @@ jobs:
          !contains(github.event.issue.labels.*.name, 'autolabel/ignore') &&
          !contains(github.event.issue.labels.*.name, 'build/camel-main') &&
          !contains(github.event.issue.labels.*.name, 'build/quarkus-main')"
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-slim
     steps:
       - name: Checkout Code
         uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
diff --git a/.github/workflows/pr-doc-validation.yml b/.github/workflows/pr-doc-validation.yml
index f51b6030ce..a438589598 100644
--- a/.github/workflows/pr-doc-validation.yml
+++ b/.github/workflows/pr-doc-validation.yml
@@ -36,8 +36,11 @@ permissions:
 jobs:
   check-doc:
     if: github.repository == 'apache/camel-quarkus'
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-slim
     steps:
+      # ubuntu-slim does not provide yarn, so install the same version that ubuntu-latest does
+      - name: Install yarn
+        run: npm install -g yarn@1.22.22
       - name: Checkout camel-quarkus repo
         uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
         with:
diff --git a/.github/workflows/synchronize-dependabot-branch.yaml b/.github/workflows/synchronize-dependabot-branch.yaml
index 517531ca10..2855bb6a74 100644
--- a/.github/workflows/synchronize-dependabot-branch.yaml
+++ b/.github/workflows/synchronize-dependabot-branch.yaml
@@ -27,7 +27,7 @@ on:
 
 jobs:
   update:
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-slim
     permissions:
       # Read the changeset artifact produced by the unprivileged CI run
       actions: read
@@ -64,7 +64,7 @@ jobs:
               });
 
               const fs = require('fs');
-              fs.writeFileSync('/home/runner/work/dependabot-pr.zip', Buffer.from(download.data));
+              fs.writeFileSync(`${process.env.RUNNER_TEMP}/dependabot-pr.zip`, Buffer.from(download.data));
               return true;
             }
 
@@ -75,26 +75,28 @@ jobs:
         env:
           HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
         run: |
-          if [[ -f /home/runner/work/dependabot-pr.zip ]]; then
-            mkdir -p /home/runner/work/dependabot-pr
-            unzip -o /home/runner/work/dependabot-pr.zip -d /home/runner/work/dependabot-pr
+          PR_ZIP="${RUNNER_TEMP:?}/dependabot-pr.zip"
+          PR_DIR="${RUNNER_TEMP:?}/dependabot-pr"
+          if [[ -f "${PR_ZIP}" ]]; then
+            mkdir -p "${PR_DIR}"
+            unzip -o "${PR_ZIP}" -d "${PR_DIR}"
 
-            PR_HEAD_SHA=$(cat /home/runner/work/dependabot-pr/PR_HEAD_SHA)
+            PR_HEAD_SHA=$(cat "${PR_DIR}/PR_HEAD_SHA")
             if [[ ! "${PR_HEAD_SHA}" =~ ^[0-9a-f]{40}$ ]]; then
               exit 1
             fi
 
-            PR_NUMBER=$(cat /home/runner/work/dependabot-pr/PR_NUMBER)
+            PR_NUMBER=$(cat "${PR_DIR}/PR_NUMBER")
             if [[ ! "${PR_NUMBER}" =~ ^[0-9]+$ ]]; then
               exit 1
             fi
 
-            PR_AUTHOR=$(cat /home/runner/work/dependabot-pr/PR_AUTHOR)
+            PR_AUTHOR=$(cat "${PR_DIR}/PR_AUTHOR")
             if [[ "${PR_AUTHOR}" != "dependabot[bot]" ]]; then
               exit 1
             fi
 
-            BRANCH_REF=$(cat /home/runner/work/dependabot-pr/BRANCH_REF)
+            BRANCH_REF=$(cat "${PR_DIR}/BRANCH_REF")
             if [[ ! "${BRANCH_REF}" =~ ^dependabot/[A-Za-z0-9._/-]+$ ]]; then
               exit 1
             fi
@@ -125,7 +127,7 @@ jobs:
           git config --local user.email "49699333+dependabot[bot]@users.noreply.github.com"
           git config --local user.name "dependabot[bot]"
 
-          CHANGES_PATH=/home/runner/work/dependabot-pr/changes.patch
+          CHANGES_PATH="${RUNNER_TEMP:?}/dependabot-pr/changes.patch"
           if [[ -f "${CHANGES_PATH}" ]]; then
             COMMIT_MESSAGE="Auto generated changes for dependabot commit $(git log -1 --pretty=%H)"
 
@@ -167,7 +169,7 @@ jobs:
 
   rerun-pr-workflow:
     needs: update
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-slim
     if: needs.update.outputs.pr-updated == 'true'
     permissions:
       actions: write