From 96775d28ee78661f2f4ba874c948aa69218132a8 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sun, 4 May 2025 18:20:27 +0100 Subject: [PATCH 01/21] renamed archive folder --- .github/{archive => .archive}/pr-checks.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{archive => .archive}/pr-checks.yml (100%) diff --git a/.github/archive/pr-checks.yml b/.github/.archive/pr-checks.yml similarity index 100% rename from .github/archive/pr-checks.yml rename to .github/.archive/pr-checks.yml From 63f1a83c2d2325aeb3744e8e307a33166bb7b0eb Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sun, 4 May 2025 18:26:09 +0100 Subject: [PATCH 02/21] Refactor benchmark workflow to include runner selection logic --- .github/workflows/run-benchmarks.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-benchmarks.yml b/.github/workflows/run-benchmarks.yml index b05029e..f6cca7a 100644 --- a/.github/workflows/run-benchmarks.yml +++ b/.github/workflows/run-benchmarks.yml @@ -7,8 +7,22 @@ on: # - main jobs: - run-benchmarks: + pick-runner: runs-on: ubuntu-latest + outputs: + runner: ${{ steps.choose.outputs.use-runner }} + steps: + - uses: actions/checkout@v4 + - id: choose + uses: ./.github/actions/runner-fallback + with: + primary-runner: "self-hosted,ubuntu-latest" + fallback-runner: "ubuntu-latest" + github-token: ${{ secrets.GITHUB_TOKEN }} + + run-benchmarks: + needs: pick-runner + runs-on: ${{ fromJson(needs.pick-runner.outputs.runner) }} steps: - name: Checkout code From e74617f2e45f36ec8a5ea75192ae87beb9d8aa90 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sun, 4 May 2025 18:41:02 +0100 Subject: [PATCH 03/21] Rename documentation output directory and update redirect in index.html --- .github/workflows/docs-and-testcov.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index 94eab46..ddf5e71 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -101,7 +101,9 @@ jobs: cp last-commit-date.json target/doc/rustframe/ mkdir -p target/doc/rustframe/.github cp .github/rustframe_logo.png target/doc/rustframe/.github/ - echo "" > target/doc/index.html + + mv target/doc/rustframe target/doc/docs + echo "" > target/doc/index.html - name: Upload Pages artifact if: github.event_name == 'push' From 02c00cc65788aeee84c3ec6ae110cd5576ae0e25 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sun, 4 May 2025 18:44:02 +0100 Subject: [PATCH 04/21] Update upload condition for Pages artifact to include workflow_dispatch --- .github/workflows/docs-and-testcov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index ddf5e71..ce46204 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -106,7 +106,7 @@ jobs: echo "" > target/doc/index.html - name: Upload Pages artifact - if: github.event_name == 'push' + if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' uses: actions/upload-pages-artifact@v3 with: path: target/doc/ From 18887e72ae805e9b421de3ae689a570ac8ff8d2b Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sun, 4 May 2025 18:48:26 +0100 Subject: [PATCH 05/21] Update deploy condition for GitHub Pages to include workflow_dispatch --- .github/workflows/docs-and-testcov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index ce46204..f59eebd 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -112,5 +112,5 @@ jobs: path: target/doc/ - name: Deploy to GitHub Pages - if: github.event_name == 'push' + if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' uses: actions/deploy-pages@v4 From 3f11068f9c0290599ec67247effd0af67b345d73 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sun, 4 May 2025 20:53:32 +0100 Subject: [PATCH 06/21] Refactor documentation output structure and update index redirect --- .github/workflows/docs-and-testcov.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index f59eebd..3073481 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -102,7 +102,9 @@ jobs: mkdir -p target/doc/rustframe/.github cp .github/rustframe_logo.png target/doc/rustframe/.github/ - mv target/doc/rustframe target/doc/docs + mkdir -p target/doc/docs + mv target/doc/rustframe/ target/doc/docs/ + echo "" > target/doc/index.html - name: Upload Pages artifact From a62c24304ecd8cb9e9eec05e868130a5831aed6f Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sun, 4 May 2025 21:14:35 +0100 Subject: [PATCH 07/21] Update index redirect and comment out deploy conditions for Pages --- .github/workflows/docs-and-testcov.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index 3073481..bd4c5f9 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -101,18 +101,14 @@ jobs: cp last-commit-date.json target/doc/rustframe/ mkdir -p target/doc/rustframe/.github cp .github/rustframe_logo.png target/doc/rustframe/.github/ - - mkdir -p target/doc/docs - mv target/doc/rustframe/ target/doc/docs/ - - echo "" > target/doc/index.html + echo "" > target/doc/index.html - name: Upload Pages artifact - if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' + # if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' uses: actions/upload-pages-artifact@v3 with: path: target/doc/ - name: Deploy to GitHub Pages - if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' - uses: actions/deploy-pages@v4 + # if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' + uses: actions/deploy-pages@v4 \ No newline at end of file From 6d79797266a276471dfb65de5a3ef946ab234ab8 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sun, 4 May 2025 21:15:27 +0100 Subject: [PATCH 08/21] Update push branches in docs-and-testcov workflow to include update_docs_workflow --- .github/workflows/docs-and-testcov.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index bd4c5f9..494334a 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -6,9 +6,9 @@ concurrency: on: push: - branches: [main] -# pull_request: -# branches: [main] + branches: [main, update_docs_workflow] + # pull_request: + # branches: [main] workflow_dispatch: permissions: From 88d1d6b3ff98bd89eec42393a492726202ebe82a Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sun, 4 May 2025 21:23:23 +0100 Subject: [PATCH 09/21] Update primary-runner configuration to use self-hosted only in workflows --- .github/workflows/docs-and-testcov.yml | 2 +- .github/workflows/run-benchmarks.yml | 2 +- .github/workflows/run-unit-tests.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index 494334a..7bf2048 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -27,7 +27,7 @@ jobs: - id: choose uses: ./.github/actions/runner-fallback with: - primary-runner: "self-hosted,ubuntu-latest" + primary-runner: "self-hosted" fallback-runner: "ubuntu-latest" github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/run-benchmarks.yml b/.github/workflows/run-benchmarks.yml index f6cca7a..86e3c69 100644 --- a/.github/workflows/run-benchmarks.yml +++ b/.github/workflows/run-benchmarks.yml @@ -16,7 +16,7 @@ jobs: - id: choose uses: ./.github/actions/runner-fallback with: - primary-runner: "self-hosted,ubuntu-latest" + primary-runner: "self-hosted" fallback-runner: "ubuntu-latest" github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/run-unit-tests.yml b/.github/workflows/run-unit-tests.yml index 2b8cd8f..dfc743b 100644 --- a/.github/workflows/run-unit-tests.yml +++ b/.github/workflows/run-unit-tests.yml @@ -21,7 +21,7 @@ jobs: - id: choose uses: ./.github/actions/runner-fallback with: - primary-runner: "self-hosted,ubuntu-latest" + primary-runner: "self-hosted" fallback-runner: "ubuntu-latest" github-token: ${{ secrets.GITHUB_TOKEN }} From 186dffe29b01c487c0079130b964c267702d2ab6 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sun, 4 May 2025 21:27:14 +0100 Subject: [PATCH 10/21] Update output directory structure for documentation and coverage reports --- .github/workflows/docs-and-testcov.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index 7bf2048..6fa7bb4 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -94,14 +94,18 @@ jobs: - name: Copy files to output directory run: | + # mkdir docs + mkdir -p target/doc/docs + cp -r target/doc/rustframe/* target/doc/docs/ + mkdir output - cp tarpaulin-report.html target/doc/rustframe/ - cp tarpaulin-report.json target/doc/rustframe/ - cp tarpaulin-badge.json target/doc/rustframe/ - cp last-commit-date.json target/doc/rustframe/ - mkdir -p target/doc/rustframe/.github - cp .github/rustframe_logo.png target/doc/rustframe/.github/ - echo "" > target/doc/index.html + cp tarpaulin-report.html target/doc/docs/ + cp tarpaulin-report.json target/doc/docs/ + cp tarpaulin-badge.json target/doc/docs/ + cp last-commit-date.json target/doc/docs/ + mkdir -p target/doc/docs/.github + cp .github/rustframe_logo.png target/doc/docs/.github/ + echo "" > target/doc/index.html - name: Upload Pages artifact # if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' From 5cca2ca1491ac909874cc7ac449d607f8fdf2fad Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 00:32:30 +0100 Subject: [PATCH 11/21] Update coverage badge URL in README.md to point to the correct documentation path --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 931b463..490deea 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![codecov](https://codecov.io/gh/Magnus167/rustframe/graph/badge.svg?token=J7ULJEFTVI)](https://codecov.io/gh/Magnus167/rustframe) -[![Coverage](https://img.shields.io/endpoint?url=https://magnus167.github.io/rustframe/rustframe/tarpaulin-badge.json)](https://magnus167.github.io/rustframe/rustframe/tarpaulin-report.html) +[![Coverage](https://img.shields.io/endpoint?url=https://magnus167.github.io/rustframe/docs/tarpaulin-badge.json)](https://magnus167.github.io/rustframe/docs/tarpaulin-report.html) --- From ac4d67146e8d676a0d6c715530b5bb40e1d9f0bf Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 00:34:48 +0100 Subject: [PATCH 12/21] Add error handling for fetching runners in runner-fallback action --- .github/actions/runner-fallback/action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/actions/runner-fallback/action.yml b/.github/actions/runner-fallback/action.yml index 9b320f2..8abc9d6 100644 --- a/.github/actions/runner-fallback/action.yml +++ b/.github/actions/runner-fallback/action.yml @@ -40,6 +40,13 @@ runs: runners=$(curl -s -H "Authorization: Bearer $TOKEN" \ -H "Accept: application/vnd.github+json" \ "https://api.github.com/repos/$repo/actions/runners?per_page=100") + + # Check if runners is null or empty + if [ -z "$runners" ] || [ "$runners" = "null" ]; then + echo "❌ Error: Unable to fetch runners or no runners found." >&2 + exit 1 + fi + # Split wanted labels IFS=',' read -ra WANT <<<"$PRIMARY" online_found=0 From 5f1bb68723b8a131fad5e832f25f9d9cc32f96a9 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 00:36:42 +0100 Subject: [PATCH 13/21] Add debug logging for runners response in runner-fallback action --- .github/actions/runner-fallback/action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/actions/runner-fallback/action.yml b/.github/actions/runner-fallback/action.yml index 8abc9d6..9b9ec37 100644 --- a/.github/actions/runner-fallback/action.yml +++ b/.github/actions/runner-fallback/action.yml @@ -41,13 +41,16 @@ runs: -H "Accept: application/vnd.github+json" \ "https://api.github.com/repos/$repo/actions/runners?per_page=100") + # Debug: Print runners content + echo "Runners response: $runners" + # Check if runners is null or empty if [ -z "$runners" ] || [ "$runners" = "null" ]; then echo "❌ Error: Unable to fetch runners or no runners found." >&2 exit 1 fi - # Split wanted labels + # Process runners only if valid IFS=',' read -ra WANT <<<"$PRIMARY" online_found=0 while read -r row; do From eb21f21dcb2a47a4fb7314bb42eb49528d041e30 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 00:46:21 +0100 Subject: [PATCH 14/21] Remove github-token input and use CUSTOM_GH_TOKEN secret for authentication in runner-fallback action --- .github/actions/runner-fallback/action.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/actions/runner-fallback/action.yml b/.github/actions/runner-fallback/action.yml index 9b9ec37..cc66ecb 100644 --- a/.github/actions/runner-fallback/action.yml +++ b/.github/actions/runner-fallback/action.yml @@ -10,9 +10,6 @@ inputs: fallback-runner: description: 'Comma-separated label list or single label for the fallback (e.g. "ubuntu-latest")' required: true - github-token: - description: "PAT or GITHUB_TOKEN with `repo` scope" - required: true outputs: use-runner: @@ -26,7 +23,7 @@ runs: id: pick shell: bash env: - TOKEN: ${{ inputs.github-token }} + TOKEN: ${{ secrets.CUSTOM_GH_TOKEN }} PRIMARY: ${{ inputs.primary-runner }} FALLBACK: ${{ inputs.fallback-runner }} run: | From 179553fe38cff12134702ac594cf9f711e8410c9 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 00:47:14 +0100 Subject: [PATCH 15/21] Add comments to clarify token permissions in runner-fallback action --- .github/actions/runner-fallback/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/runner-fallback/action.yml b/.github/actions/runner-fallback/action.yml index cc66ecb..0a31714 100644 --- a/.github/actions/runner-fallback/action.yml +++ b/.github/actions/runner-fallback/action.yml @@ -23,6 +23,8 @@ runs: id: pick shell: bash env: + # token needs to have reop admin read permissions + # https://docs.github.com/en/rest/actions/self-hosted-runners?apiVersion=2022-11-28#list-self-hosted-runners-for-a-repository TOKEN: ${{ secrets.CUSTOM_GH_TOKEN }} PRIMARY: ${{ inputs.primary-runner }} FALLBACK: ${{ inputs.fallback-runner }} From 80083ce77c7051d385557ef5b513fcbc6b3cbb5d Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 00:52:52 +0100 Subject: [PATCH 16/21] Refactor github-token input to use CUSTOM_GH_TOKEN secret for authentication in runner-fallback action --- .github/actions/runner-fallback/action.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/actions/runner-fallback/action.yml b/.github/actions/runner-fallback/action.yml index 0a31714..ea0b805 100644 --- a/.github/actions/runner-fallback/action.yml +++ b/.github/actions/runner-fallback/action.yml @@ -10,6 +10,10 @@ inputs: fallback-runner: description: 'Comma-separated label list or single label for the fallback (e.g. "ubuntu-latest")' required: true + github-token: + description: 'GitHub token with repo admin read permissions' + required: false + default: ${{ secrets.CUSTOM_GH_TOKEN }} outputs: use-runner: @@ -23,9 +27,7 @@ runs: id: pick shell: bash env: - # token needs to have reop admin read permissions - # https://docs.github.com/en/rest/actions/self-hosted-runners?apiVersion=2022-11-28#list-self-hosted-runners-for-a-repository - TOKEN: ${{ secrets.CUSTOM_GH_TOKEN }} + TOKEN: ${{ inputs.github-token }} PRIMARY: ${{ inputs.primary-runner }} FALLBACK: ${{ inputs.fallback-runner }} run: | From 7e27539529cdbb925e898fabad998ce95067097a Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 01:04:56 +0100 Subject: [PATCH 17/21] Update GitHub token input to require CUSTOM_GH_TOKEN for authentication in workflows --- .github/actions/runner-fallback/action.yml | 5 +++-- .github/workflows/docs-and-testcov.yml | 2 +- .github/workflows/run-benchmarks.yml | 2 +- .github/workflows/run-unit-tests.yml | 6 +++++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/actions/runner-fallback/action.yml b/.github/actions/runner-fallback/action.yml index ea0b805..31bb0fe 100644 --- a/.github/actions/runner-fallback/action.yml +++ b/.github/actions/runner-fallback/action.yml @@ -12,8 +12,9 @@ inputs: required: true github-token: description: 'GitHub token with repo admin read permissions' - required: false - default: ${{ secrets.CUSTOM_GH_TOKEN }} + required: true + + outputs: use-runner: diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index 6fa7bb4..346335f 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -29,7 +29,7 @@ jobs: with: primary-runner: "self-hosted" fallback-runner: "ubuntu-latest" - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.CUSTOM_GH_TOKEN }} docs-and-testcov: needs: pick-runner diff --git a/.github/workflows/run-benchmarks.yml b/.github/workflows/run-benchmarks.yml index 86e3c69..a7c3044 100644 --- a/.github/workflows/run-benchmarks.yml +++ b/.github/workflows/run-benchmarks.yml @@ -18,7 +18,7 @@ jobs: with: primary-runner: "self-hosted" fallback-runner: "ubuntu-latest" - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.CUSTOM_GH_TOKEN }} run-benchmarks: needs: pick-runner diff --git a/.github/workflows/run-unit-tests.yml b/.github/workflows/run-unit-tests.yml index dfc743b..1aa68c5 100644 --- a/.github/workflows/run-unit-tests.yml +++ b/.github/workflows/run-unit-tests.yml @@ -12,18 +12,22 @@ concurrency: jobs: pick-runner: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest outputs: runner: ${{ steps.choose.outputs.use-runner }} steps: + - uses: actions/checkout@v4 - id: choose uses: ./.github/actions/runner-fallback with: primary-runner: "self-hosted" fallback-runner: "ubuntu-latest" - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.CUSTOM_GH_TOKEN }} + run-unit-tests: needs: pick-runner From eeba602c140d904dc657e9568064f2eb37ea9ce7 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 01:28:01 +0100 Subject: [PATCH 18/21] Refactor Dockerfile to install Rust and Cargo dependencies --- .github/runners/runner-x64/Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/runners/runner-x64/Dockerfile b/.github/runners/runner-x64/Dockerfile index efcba95..c326118 100644 --- a/.github/runners/runner-x64/Dockerfile +++ b/.github/runners/runner-x64/Dockerfile @@ -9,8 +9,13 @@ RUN apt update -y && apt upgrade -y && useradd -m docker RUN apt install -y --no-install-recommends \ curl jq build-essential libssl-dev libffi-dev python3 python3-venv python3-dev python3-pip \ # dot net core dependencies - libicu74 libssl3 libkrb5-3 zlib1g libcurl4 + libicu74 libssl3 libkrb5-3 zlib1g libcurl4 \ + # Rust and Cargo dependencies + gcc cmake +# Install Rust and Cargo +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +ENV PATH="/home/docker/.cargo/bin:${PATH}" RUN cd /home/docker && mkdir actions-runner && cd actions-runner \ && curl -O -L https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz \ From d42437bf32885669bf06b1a5785518a3ecc0b147 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 01:30:20 +0100 Subject: [PATCH 19/21] Refactor Dockerfile to rearrange package installation for clarity --- .github/runners/runner-x64/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/runners/runner-x64/Dockerfile b/.github/runners/runner-x64/Dockerfile index c326118..07b7554 100644 --- a/.github/runners/runner-x64/Dockerfile +++ b/.github/runners/runner-x64/Dockerfile @@ -7,12 +7,15 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt update -y && apt upgrade -y && useradd -m docker RUN apt install -y --no-install-recommends \ - curl jq build-essential libssl-dev libffi-dev python3 python3-venv python3-dev python3-pip \ + curl jq git \ + # dev dependencies + build-essential libssl-dev libffi-dev python3 python3-venv python3-dev python3-pip \ # dot net core dependencies libicu74 libssl3 libkrb5-3 zlib1g libcurl4 \ # Rust and Cargo dependencies gcc cmake + # Install Rust and Cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ENV PATH="/home/docker/.cargo/bin:${PATH}" From 5e03e7f1e5ae8d52b501ba0713193263f1b18e77 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 01:38:07 +0100 Subject: [PATCH 20/21] Comment out debug print statement for runners response in runner-fallback action --- .github/actions/runner-fallback/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/runner-fallback/action.yml b/.github/actions/runner-fallback/action.yml index 31bb0fe..c8e6d33 100644 --- a/.github/actions/runner-fallback/action.yml +++ b/.github/actions/runner-fallback/action.yml @@ -44,7 +44,7 @@ runs: "https://api.github.com/repos/$repo/actions/runners?per_page=100") # Debug: Print runners content - echo "Runners response: $runners" + # echo "Runners response: $runners" # Check if runners is null or empty if [ -z "$runners" ] || [ "$runners" = "null" ]; then From 345166b16c83a33209aac1fee282eeb45ef3c841 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 01:38:13 +0100 Subject: [PATCH 21/21] Set HOME environment variable for Docker user in Dockerfile --- .github/runners/runner-x64/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/runners/runner-x64/Dockerfile b/.github/runners/runner-x64/Dockerfile index 07b7554..79ee4e3 100644 --- a/.github/runners/runner-x64/Dockerfile +++ b/.github/runners/runner-x64/Dockerfile @@ -19,6 +19,7 @@ RUN apt install -y --no-install-recommends \ # Install Rust and Cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ENV PATH="/home/docker/.cargo/bin:${PATH}" +ENV HOME="/home/docker" RUN cd /home/docker && mkdir actions-runner && cd actions-runner \ && curl -O -L https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz \