From 5adf77fbfcbd3fe8aa62365fd9f33f673e034eaf Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 31 Jan 2024 14:52:28 +0100 Subject: [PATCH 01/36] If no `sparse-checkout` parameter is specified, disable it This should allow users to reuse existing folders when running `actions/checkout` where a previous run asked for a sparse checkout but the current run does not ask for a sparse checkout. This fixes https://github.com/actions/checkout/issues/1475 Signed-off-by: Johannes Schindelin --- __test__/git-auth-helper.test.ts | 1 + __test__/git-directory-helper.test.ts | 1 + src/git-command-manager.ts | 5 +++++ src/git-source-provider.ts | 4 +++- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/__test__/git-auth-helper.test.ts b/__test__/git-auth-helper.test.ts index 411faed05..a75b79d24 100644 --- a/__test__/git-auth-helper.test.ts +++ b/__test__/git-auth-helper.test.ts @@ -727,6 +727,7 @@ async function setup(testName: string): Promise { branchDelete: jest.fn(), branchExists: jest.fn(), branchList: jest.fn(), + disableSparseCheckout: jest.fn(), sparseCheckout: jest.fn(), sparseCheckoutNonConeMode: jest.fn(), checkout: jest.fn(), diff --git a/__test__/git-directory-helper.test.ts b/__test__/git-directory-helper.test.ts index 362133f4c..79e0538a7 100644 --- a/__test__/git-directory-helper.test.ts +++ b/__test__/git-directory-helper.test.ts @@ -462,6 +462,7 @@ async function setup(testName: string): Promise { branchList: jest.fn(async () => { return [] }), + disableSparseCheckout: jest.fn(), sparseCheckout: jest.fn(), sparseCheckoutNonConeMode: jest.fn(), checkout: jest.fn(), diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index 7752cfa4d..0f3fd25af 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -17,6 +17,7 @@ export interface IGitCommandManager { branchDelete(remote: boolean, branch: string): Promise branchExists(remote: boolean, pattern: string): Promise branchList(remote: boolean): Promise + disableSparseCheckout(): Promise sparseCheckout(sparseCheckout: string[]): Promise sparseCheckoutNonConeMode(sparseCheckout: string[]): Promise checkout(ref: string, startPoint: string): Promise @@ -171,6 +172,10 @@ class GitCommandManager { return result } + async disableSparseCheckout(): Promise { + await this.execGit(['sparse-checkout', 'disable']) + } + async sparseCheckout(sparseCheckout: string[]): Promise { await this.execGit(['sparse-checkout', 'set', ...sparseCheckout]) } diff --git a/src/git-source-provider.ts b/src/git-source-provider.ts index 5c98e9f73..05897222e 100644 --- a/src/git-source-provider.ts +++ b/src/git-source-provider.ts @@ -208,7 +208,9 @@ export async function getSource(settings: IGitSourceSettings): Promise { } // Sparse checkout - if (settings.sparseCheckout) { + if (!settings.sparseCheckout) { + await git.disableSparseCheckout() + } else { core.startGroup('Setting up sparse checkout') if (settings.sparseCheckoutConeMode) { await git.sparseCheckout(settings.sparseCheckout) From c4cda129b7df103cf03f63824b501cc79ab3d2bf Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 31 Jan 2024 14:54:18 +0100 Subject: [PATCH 02/36] npm run build Signed-off-by: Johannes Schindelin --- dist/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index ddf2b3d89..13896027d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -576,6 +576,11 @@ class GitCommandManager { return result; }); } + disableSparseCheckout() { + return __awaiter(this, void 0, void 0, function* () { + yield this.execGit(['sparse-checkout', 'disable']); + }); + } sparseCheckout(sparseCheckout) { return __awaiter(this, void 0, void 0, function* () { yield this.execGit(['sparse-checkout', 'set', ...sparseCheckout]); @@ -1282,7 +1287,10 @@ function getSource(settings) { core.endGroup(); } // Sparse checkout - if (settings.sparseCheckout) { + if (!settings.sparseCheckout) { + yield git.disableSparseCheckout(); + } + else { core.startGroup('Setting up sparse checkout'); if (settings.sparseCheckoutConeMode) { yield git.sparseCheckout(settings.sparseCheckout); From 6f108b29f4e6002ece48c0cd535662eb4504675f Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 31 Jan 2024 14:57:38 +0100 Subject: [PATCH 03/36] ci: verify that an existing sparse checkout can be made unsparse There are use cases in particular with non-ephemeral runners where an existing worktree (that has been initialized as a sparse checkout) is reused in subsequent CI runs (where `actions/checkout` is run _without_ any `sparse-checkout` parameter). In these scenarios, we need to make sure that the sparse checkout is disabled before checking out the files. Signed-off-by: Johannes Schindelin --- .github/workflows/test.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 15996ee7e..a9ac55e37 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -95,6 +95,16 @@ jobs: - name: Verify sparse checkout run: __test__/verify-sparse-checkout.sh + # Disabled sparse checkout in existing checkout + - name: Disabled sparse checkout + uses: ./ + with: + path: sparse-checkout + + - name: Verify disabled sparse checkout + shell: bash + run: set -x && ls -l sparse-checkout/src/git-command-manager.ts + # Sparse checkout (non-cone mode) - name: Sparse checkout (non-cone mode) uses: ./ @@ -279,4 +289,4 @@ jobs: - name: Fix Checkout v3 uses: actions/checkout@v3 with: - path: v3 \ No newline at end of file + path: v3 From 6d7426941d953a61b20e7f3620a8098d67611998 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Fri, 16 Feb 2024 13:31:30 +0100 Subject: [PATCH 04/36] Prefer ubuntu over alpine in test-proxy workflow --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a9ac55e37..6e958a3b2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -185,7 +185,7 @@ jobs: test-proxy: runs-on: ubuntu-latest container: - image: alpine/git:latest + image: ubuntu:latest options: --dns 127.0.0.1 services: squid-proxy: From 4dfc3ce2d2e951eb5e5eedb8e3e79770cf6ddf3d Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Fri, 16 Feb 2024 13:40:58 +0100 Subject: [PATCH 05/36] revert change to container image in test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6e958a3b2..a9ac55e37 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -185,7 +185,7 @@ jobs: test-proxy: runs-on: ubuntu-latest container: - image: ubuntu:latest + image: alpine/git:latest options: --dns 127.0.0.1 services: squid-proxy: From 463d0885b3a1621ec570374c73d0942cf0431415 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:16:47 +0100 Subject: [PATCH 06/36] Bump actions/checkout version in `test-proxy` --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a9ac55e37..6c9b837f0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -197,7 +197,7 @@ jobs: steps: # Clone this repo - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Basic checkout using git - name: Checkout basic From ed56252dbe8097864bdbc4b95acf88d3226f4c6e Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:23:37 +0100 Subject: [PATCH 07/36] prefer ununtu over alpine in `test-proxy` --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c9b837f0..6e958a3b2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -185,7 +185,7 @@ jobs: test-proxy: runs-on: ubuntu-latest container: - image: alpine/git:latest + image: ubuntu:latest options: --dns 127.0.0.1 services: squid-proxy: @@ -197,7 +197,7 @@ jobs: steps: # Clone this repo - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 # Basic checkout using git - name: Checkout basic From 268a122c29d12610a64170c6e85fb354369ce69e Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:57:51 +0100 Subject: [PATCH 08/36] Temporarily disable failing test. Added a clarifying comment about test branches. --- .github/workflows/test.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6e958a3b2..dd7ce9f7b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,6 +7,11 @@ on: - main - releases/* + +# Note when you see patterns like "ref: test-data/v2/basic" within this workflow, +# these refer to "test-data" branches on this actions/checkout repo. +# (For example, test-data/v2/basic -> https://github.com/actions/checkout/tree/test-data/v2/basic) + jobs: build: runs-on: ubuntu-latest @@ -205,8 +210,8 @@ jobs: with: ref: test-data/v2/basic path: basic - - name: Verify basic - run: __test__/verify-basic.sh + # - name: Verify basic + # run: __test__/verify-basic.sh # Basic checkout using REST API - name: Remove basic From b300d42bb04c83bbe281a7878338bc6211a98fff Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:10:12 +0100 Subject: [PATCH 09/36] Inspect git version during `test-proxy` --- .github/workflows/test.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dd7ce9f7b..9cca46d0e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ on: - releases/* -# Note when you see patterns like "ref: test-data/v2/basic" within this workflow, +# Note that when you see patterns like "ref: test-data/v2/basic" within this workflow, # these refer to "test-data" branches on this actions/checkout repo. # (For example, test-data/v2/basic -> https://github.com/actions/checkout/tree/test-data/v2/basic) @@ -204,14 +204,17 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - name: Inspect Git Version + run: git --version + # Basic checkout using git - name: Checkout basic uses: ./ with: ref: test-data/v2/basic path: basic - # - name: Verify basic - # run: __test__/verify-basic.sh + - name: Verify basic + run: __test__/verify-basic.sh # Basic checkout using REST API - name: Remove basic From 9b4fb8ba7deb02205eb24c904bd14453103c0c6b Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:14:37 +0100 Subject: [PATCH 10/36] fix order-of-operations in test.yml --- .github/workflows/test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9cca46d0e..a9316e3b7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -204,9 +204,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Inspect Git Version - run: git --version - # Basic checkout using git - name: Checkout basic uses: ./ @@ -217,6 +214,8 @@ jobs: run: __test__/verify-basic.sh # Basic checkout using REST API + - name: Inspect Git Version + run: git --version - name: Remove basic run: rm -rf basic - name: Override git version From 9397c0755507c7a608ddb9cb50af149ab0198c24 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:16:15 +0100 Subject: [PATCH 11/36] Fix order-of-operations in test.yml --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a9316e3b7..c686471b2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -210,12 +210,12 @@ jobs: with: ref: test-data/v2/basic path: basic + - name: Inspect Git Version + run: git --version - name: Verify basic run: __test__/verify-basic.sh # Basic checkout using REST API - - name: Inspect Git Version - run: git --version - name: Remove basic run: rm -rf basic - name: Override git version From 3940af5a92310665429db78d156d8f3fe3e93730 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:22:23 +0100 Subject: [PATCH 12/36] Ensure `test-proxy` is using an up-to-date version of git --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c686471b2..c5b63a602 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -200,6 +200,11 @@ jobs: env: https_proxy: http://squid-proxy:3128 steps: + - name: Install Git + run: | + apt-get update + apt-get install git + # Clone this repo - name: Checkout uses: actions/checkout@v3 From 572f5de1b05395c6e6e05dae84f64f5c48ca5951 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Fri, 16 Feb 2024 18:28:36 +0100 Subject: [PATCH 13/36] Experiment on `test-proxy` Try pointing `test-proxy` at a custom container image `fdev321123/ubuntu-with-git` (courtesy of @fhammerl) --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c5b63a602..7bea61763 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -190,7 +190,7 @@ jobs: test-proxy: runs-on: ubuntu-latest container: - image: ubuntu:latest + image: fdev321123/ubuntu-with-git:latest options: --dns 127.0.0.1 services: squid-proxy: @@ -200,10 +200,10 @@ jobs: env: https_proxy: http://squid-proxy:3128 steps: - - name: Install Git - run: | - apt-get update - apt-get install git + # - name: Install Git + # run: | + # apt-get update + # apt-get install git # Clone this repo - name: Checkout From 78c6190d6f314781343ae8854966b63cb6766832 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 00:48:59 +0100 Subject: [PATCH 14/36] Create ubuntu-with-git.Dockerfile --- .github/workflows/ubuntu-with-git.Dockerfile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/workflows/ubuntu-with-git.Dockerfile diff --git a/.github/workflows/ubuntu-with-git.Dockerfile b/.github/workflows/ubuntu-with-git.Dockerfile new file mode 100644 index 000000000..ff801b62f --- /dev/null +++ b/.github/workflows/ubuntu-with-git.Dockerfile @@ -0,0 +1,3 @@ +FROM ubuntu:latest +RUN apt update +RUN apt install -y git From a48123a2d53c57e5194ccf7b7c0bc96fd8d057a5 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 01:25:29 +0100 Subject: [PATCH 15/36] Rename ubuntu-with-git.Dockerfile to Dockerfile --- .../ubuntu-with-git.Dockerfile => ubuntu-with-git/Dockerfile} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{workflows/ubuntu-with-git.Dockerfile => ubuntu-with-git/Dockerfile} (100%) diff --git a/.github/workflows/ubuntu-with-git.Dockerfile b/.github/ubuntu-with-git/Dockerfile similarity index 100% rename from .github/workflows/ubuntu-with-git.Dockerfile rename to .github/ubuntu-with-git/Dockerfile From 34a3ecdf022407eab02dcaca997e5fa056af049b Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 01:29:17 +0100 Subject: [PATCH 16/36] Create ubuntu-with-git/action.yml --- .github/ubuntu-with-git/action.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/ubuntu-with-git/action.yml diff --git a/.github/ubuntu-with-git/action.yml b/.github/ubuntu-with-git/action.yml new file mode 100644 index 000000000..e2bcdb3ba --- /dev/null +++ b/.github/ubuntu-with-git/action.yml @@ -0,0 +1,5 @@ +name: Ubuntu with Git +description: Creates a Docker Container Image with git pre-installed. +runs: + using: 'docker' + image: 'Dockerfile' From 6af92d23ad727e0114219287f98437505eb62c17 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 02:26:00 +0100 Subject: [PATCH 17/36] Delete .github/ubuntu-with-git directory --- .github/ubuntu-with-git/Dockerfile | 3 --- .github/ubuntu-with-git/action.yml | 5 ----- 2 files changed, 8 deletions(-) delete mode 100644 .github/ubuntu-with-git/Dockerfile delete mode 100644 .github/ubuntu-with-git/action.yml diff --git a/.github/ubuntu-with-git/Dockerfile b/.github/ubuntu-with-git/Dockerfile deleted file mode 100644 index ff801b62f..000000000 --- a/.github/ubuntu-with-git/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM ubuntu:latest -RUN apt update -RUN apt install -y git diff --git a/.github/ubuntu-with-git/action.yml b/.github/ubuntu-with-git/action.yml deleted file mode 100644 index e2bcdb3ba..000000000 --- a/.github/ubuntu-with-git/action.yml +++ /dev/null @@ -1,5 +0,0 @@ -name: Ubuntu with Git -description: Creates a Docker Container Image with git pre-installed. -runs: - using: 'docker' - image: 'Dockerfile' From 894f97fe2e93759284359cd400303092e2dd2835 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 02:26:50 +0100 Subject: [PATCH 18/36] Removed commented-out docker commands in test.yml --- .github/workflows/test.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7bea61763..db833b9ce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -200,11 +200,6 @@ jobs: env: https_proxy: http://squid-proxy:3128 steps: - # - name: Install Git - # run: | - # apt-get update - # apt-get install git - # Clone this repo - name: Checkout uses: actions/checkout@v3 From 996d1458e21f035cd3162603c818442c5db0ff05 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 03:19:14 +0100 Subject: [PATCH 19/36] Second attempt to install git via `apt-get` --- .github/workflows/test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index db833b9ce..511dc5691 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -190,7 +190,7 @@ jobs: test-proxy: runs-on: ubuntu-latest container: - image: fdev321123/ubuntu-with-git:latest + image: ubuntu:latest options: --dns 127.0.0.1 services: squid-proxy: @@ -200,6 +200,11 @@ jobs: env: https_proxy: http://squid-proxy:3128 steps: + - name: Install Git + run: | + apt-get update + apt-get install git + # Clone this repo - name: Checkout uses: actions/checkout@v3 From 87e9846a672c4f205a0833326903665c0faab49b Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 03:21:48 +0100 Subject: [PATCH 20/36] Followed official guidance for installing git source: https://git-scm.com/download/linux --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 511dc5691..1cdc297d7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -202,6 +202,7 @@ jobs: steps: - name: Install Git run: | + add-apt-repository ppa:git-core/ppa apt-get update apt-get install git From 772739e5265c9841554d3f7b20c0ddb1ee6125cd Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 03:28:37 +0100 Subject: [PATCH 21/36] ensure `software-properties-common` is installed. --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1cdc297d7..acb456333 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -202,8 +202,9 @@ jobs: steps: - name: Install Git run: | + # apt-get update + apt-get install software-properties-common add-apt-repository ppa:git-core/ppa - apt-get update apt-get install git # Clone this repo From 97826d9e805fa10eb564cdc078d6608bffb5ff0c Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 03:32:47 +0100 Subject: [PATCH 22/36] Tweaked `apt` commands --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index acb456333..ceddf9aab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -202,9 +202,9 @@ jobs: steps: - name: Install Git run: | - # apt-get update apt-get install software-properties-common add-apt-repository ppa:git-core/ppa + apt-get update apt-get install git # Clone this repo From eb87b7acbe62999a4f6db21dc2d3ff4bcb7e0db6 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 03:34:00 +0100 Subject: [PATCH 23/36] Tweaked `apt` commands --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ceddf9aab..f4597b855 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -202,6 +202,7 @@ jobs: steps: - name: Install Git run: | + apt-get update apt-get install software-properties-common add-apt-repository ppa:git-core/ppa apt-get update From d5b8261d14cdd3e03ba2ef066ddfa582c8a27397 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 03:38:18 +0100 Subject: [PATCH 24/36] Upgrade `apt-get` --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f4597b855..777f98cfe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -202,6 +202,8 @@ jobs: steps: - name: Install Git run: | + apt-get clean + apt-get upgrade apt-get update apt-get install software-properties-common add-apt-repository ppa:git-core/ppa From 2349742c16d6c37af6b8e04fd7a5663a0a70a554 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 03:43:47 +0100 Subject: [PATCH 25/36] Try disabling `https_proxy` while git installs. --- .github/workflows/test.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 777f98cfe..d696b73b0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -201,12 +201,14 @@ jobs: https_proxy: http://squid-proxy:3128 steps: - name: Install Git + env: + https_proxy: "" # Disable https_proxy for this single step run: | - apt-get clean - apt-get upgrade - apt-get update - apt-get install software-properties-common - add-apt-repository ppa:git-core/ppa + # apt-get clean + # apt-get upgrade + # apt-get update + # apt-get install software-properties-common + # add-apt-repository ppa:git-core/ppa apt-get update apt-get install git From 28a19e17a8eae49cdc47d43e2dd0f3caced48300 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 03:46:02 +0100 Subject: [PATCH 26/36] Update test.yml --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d696b73b0..1c3f839f2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -204,11 +204,11 @@ jobs: env: https_proxy: "" # Disable https_proxy for this single step run: | - # apt-get clean - # apt-get upgrade - # apt-get update - # apt-get install software-properties-common - # add-apt-repository ppa:git-core/ppa + apt-get clean + apt-get upgrade + apt-get update + apt-get install software-properties-common + add-apt-repository ppa:git-core/ppa apt-get update apt-get install git From 82808ae824f0045958d56effebfd213b4e730365 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 03:48:12 +0100 Subject: [PATCH 27/36] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1c3f839f2..a7f5bd0eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -207,7 +207,7 @@ jobs: apt-get clean apt-get upgrade apt-get update - apt-get install software-properties-common + # apt-get install software-properties-common add-apt-repository ppa:git-core/ppa apt-get update apt-get install git From 365131c8750c17e5a0af06fdf08a7f194d5ad5d3 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 03:49:05 +0100 Subject: [PATCH 28/36] Update test.yml --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a7f5bd0eb..b321b125b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -208,8 +208,8 @@ jobs: apt-get upgrade apt-get update # apt-get install software-properties-common - add-apt-repository ppa:git-core/ppa - apt-get update + # add-apt-repository ppa:git-core/ppa + # apt-get update apt-get install git # Clone this repo From e7b6c8e8bac12a6d5005ab001735254352d7af3f Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 03:54:03 +0100 Subject: [PATCH 29/36] Update test.yml --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b321b125b..4b84ef867 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -203,6 +203,9 @@ jobs: - name: Install Git env: https_proxy: "" # Disable https_proxy for this single step + http_proxy: "" + HTTPS_PROXY: "" + HTTP_PROXY: "" run: | apt-get clean apt-get upgrade From 9af61b077fc6e4dcb17f81228fb02be1581dfec0 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 03:55:37 +0100 Subject: [PATCH 30/36] Update test.yml --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4b84ef867..d7cc632da 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -204,8 +204,6 @@ jobs: env: https_proxy: "" # Disable https_proxy for this single step http_proxy: "" - HTTPS_PROXY: "" - HTTP_PROXY: "" run: | apt-get clean apt-get upgrade From 7aa0640182a3c4cc15f084d997c7f2f3162414a9 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 04:17:21 +0100 Subject: [PATCH 31/36] Determine path to git runtime --- .github/workflows/test.yml | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d7cc632da..df89de98f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -187,6 +187,14 @@ jobs: - name: Verify basic run: __test__/verify-basic.sh --archive + inspect: + runs-on: ubuntu-latest + steps: + - name: Inspect Git Version + run: | + which git + git --version + test-proxy: runs-on: ubuntu-latest container: @@ -200,18 +208,18 @@ jobs: env: https_proxy: http://squid-proxy:3128 steps: - - name: Install Git - env: - https_proxy: "" # Disable https_proxy for this single step - http_proxy: "" - run: | - apt-get clean - apt-get upgrade - apt-get update - # apt-get install software-properties-common - # add-apt-repository ppa:git-core/ppa - # apt-get update - apt-get install git + # - name: Install Git + # env: + # https_proxy: "" # Disable https_proxy for this single step + # http_proxy: "" + # run: | + # apt-get clean + # apt-get upgrade + # apt-get update + # # apt-get install software-properties-common + # # add-apt-repository ppa:git-core/ppa + # # apt-get update + # apt-get install git # Clone this repo - name: Checkout @@ -223,8 +231,6 @@ jobs: with: ref: test-data/v2/basic path: basic - - name: Inspect Git Version - run: git --version - name: Verify basic run: __test__/verify-basic.sh From 159fd987f616cc9426a75a4241a6fc7e3d46af3e Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 04:26:39 +0100 Subject: [PATCH 32/36] Try mapping git runtime into container --- .github/workflows/test.yml | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index df89de98f..52e42aad4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -187,18 +187,12 @@ jobs: - name: Verify basic run: __test__/verify-basic.sh --archive - inspect: - runs-on: ubuntu-latest - steps: - - name: Inspect Git Version - run: | - which git - git --version - test-proxy: runs-on: ubuntu-latest container: image: ubuntu:latest + volumes: + - /usr/bin/git:/mapped/bin/git options: --dns 127.0.0.1 services: squid-proxy: @@ -208,18 +202,8 @@ jobs: env: https_proxy: http://squid-proxy:3128 steps: - # - name: Install Git - # env: - # https_proxy: "" # Disable https_proxy for this single step - # http_proxy: "" - # run: | - # apt-get clean - # apt-get upgrade - # apt-get update - # # apt-get install software-properties-common - # # add-apt-repository ppa:git-core/ppa - # # apt-get update - # apt-get install git + - name: Update System Path + run: echo "/mapped/bin" >> $GITHUB_PATH # Clone this repo - name: Checkout From 5ecc8b5e51fa33ba7b95acbae374a6406d0597f2 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 04:47:22 +0100 Subject: [PATCH 33/36] Update test.yml --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 52e42aad4..3d1cea51d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -187,6 +187,11 @@ jobs: - name: Verify basic run: __test__/verify-basic.sh --archive + inspect: + runs-on: ubuntu-latest + steps: + - run: ls -all /usr/bin + test-proxy: runs-on: ubuntu-latest container: From f0ae1980f37b752656ed1aaaa0d7fed5777764bf Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 04:52:37 +0100 Subject: [PATCH 34/36] Update test.yml --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3d1cea51d..cd35a8a9f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -198,6 +198,7 @@ jobs: image: ubuntu:latest volumes: - /usr/bin/git:/mapped/bin/git + - /usr/bin/git-shell:/mapped/bin/git-shell options: --dns 127.0.0.1 services: squid-proxy: From bbd0474dc5ec1efe53c1b18cd6c876936acf868b Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Sat, 17 Feb 2024 04:54:54 +0100 Subject: [PATCH 35/36] Update test.yml --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cd35a8a9f..6f6cd556f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -198,6 +198,8 @@ jobs: image: ubuntu:latest volumes: - /usr/bin/git:/mapped/bin/git + - /usr/bin/git-lfs:/mapped/bin/git-lfs + - /usr/bin/git-ftp:/mapped/bin/git-ftp - /usr/bin/git-shell:/mapped/bin/git-shell options: --dns 127.0.0.1 services: From 4d1347db9f84bc71d0a6e71a6947d14c2e4729f8 Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:57:34 +0100 Subject: [PATCH 36/36] `test-proxy` now uses newly-minted `test-ubuntu-git` container image from ghcr.io --- .github/workflows/test.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6f6cd556f..d8c83acf4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -187,20 +187,10 @@ jobs: - name: Verify basic run: __test__/verify-basic.sh --archive - inspect: - runs-on: ubuntu-latest - steps: - - run: ls -all /usr/bin - test-proxy: runs-on: ubuntu-latest container: - image: ubuntu:latest - volumes: - - /usr/bin/git:/mapped/bin/git - - /usr/bin/git-lfs:/mapped/bin/git-lfs - - /usr/bin/git-ftp:/mapped/bin/git-ftp - - /usr/bin/git-shell:/mapped/bin/git-shell + image: ghcr.io/actions/test-ubuntu-git:main.20240221.114913.703z options: --dns 127.0.0.1 services: squid-proxy: @@ -210,9 +200,6 @@ jobs: env: https_proxy: http://squid-proxy:3128 steps: - - name: Update System Path - run: echo "/mapped/bin" >> $GITHUB_PATH - # Clone this repo - name: Checkout uses: actions/checkout@v3