From c0396df7b79187472b2d3b9738f532e29502a2e2 Mon Sep 17 00:00:00 2001 From: Eran Kampf Date: Sat, 20 Dec 2025 19:45:59 -0800 Subject: [PATCH 1/7] add cache input param --- action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/action.yml b/action.yml index 03a75b3..37782ec 100644 --- a/action.yml +++ b/action.yml @@ -11,6 +11,10 @@ inputs: description: 'Enable debug output' required: false default: "false" + cache: + description: 'Enable caching of Twingate packages to speed up installation' + required: false + default: "true" runs: using: "composite" steps: From 74718960a099fc92c64c534ae81bdd18d471bbc0 Mon Sep 17 00:00:00 2001 From: Eran Kampf Date: Sat, 20 Dec 2025 19:53:32 -0800 Subject: [PATCH 2/7] add step - Get latest Twingate version --- action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/action.yml b/action.yml index 37782ec..9291016 100644 --- a/action.yml +++ b/action.yml @@ -25,6 +25,15 @@ runs: echo "Unsupported Runner OS: ${{ runner.os }}" exit 1 + - name: Get latest Twingate version + if: runner.os == 'Linux' && inputs.cache == 'true' + id: twingate-version + shell: bash + run: | + VERSION=$(curl -s https://packages.twingate.com/apt/Packages | awk '/^Version:/ {print $2}' | sort -V | tail -1) + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "Latest Twingate version: $VERSION" + - name: Install Twingate (Linux) if: runner.os == 'Linux' shell: bash From c95a0797ea2946bd782580492367e7d4f21043f0 Mon Sep 17 00:00:00 2001 From: Eran Kampf Date: Sat, 20 Dec 2025 19:54:50 -0800 Subject: [PATCH 3/7] Try using awalsh128/cache-apt-pkgs-action@latest --- action.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/action.yml b/action.yml index 9291016..92f0297 100644 --- a/action.yml +++ b/action.yml @@ -34,14 +34,20 @@ runs: echo "version=$VERSION" >> $GITHUB_OUTPUT echo "Latest Twingate version: $VERSION" - - name: Install Twingate (Linux) - if: runner.os == 'Linux' - shell: bash - run: | - sudo apt update - echo "deb [trusted=yes] https://packages.twingate.com/apt/ /" | sudo tee /etc/apt/sources.list.d/twingate.list - sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/twingate.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" - sudo apt install -yq twingate + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: twingate + add-repository: https://packages.twingate.com/apt/ + version: ${{ steps.twingate-version.outputs.version }} + + # - name: Install Twingate (Linux) + # if: runner.os == 'Linux' + # shell: bash + # run: | + # sudo apt update + # echo "deb [trusted=yes] https://packages.twingate.com/apt/ /" | sudo tee /etc/apt/sources.list.d/twingate.list + # sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/twingate.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" + # sudo apt install -yq twingate - name: Setup and start Twingate (Linux) if: runner.os == 'Linux' From 8197e04ca707531344dd20b0a824d392f2e38372 Mon Sep 17 00:00:00 2001 From: Eran Kampf Date: Sat, 20 Dec 2025 20:00:12 -0800 Subject: [PATCH 4/7] try --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 92f0297..c444565 100644 --- a/action.yml +++ b/action.yml @@ -34,7 +34,7 @@ runs: echo "version=$VERSION" >> $GITHUB_OUTPUT echo "Latest Twingate version: $VERSION" - - uses: awalsh128/cache-apt-pkgs-action@latest + - uses: awalsh128/cache-apt-pkgs-action@v1.6.0 with: packages: twingate add-repository: https://packages.twingate.com/apt/ From 7ea576dc808efc83e4cbd07479a98b8d5eeedfad Mon Sep 17 00:00:00 2001 From: Eran Kampf Date: Sat, 20 Dec 2025 20:02:24 -0800 Subject: [PATCH 5/7] debug --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index c444565..88b1831 100644 --- a/action.yml +++ b/action.yml @@ -39,6 +39,7 @@ runs: packages: twingate add-repository: https://packages.twingate.com/apt/ version: ${{ steps.twingate-version.outputs.version }} + debug: true # - name: Install Twingate (Linux) # if: runner.os == 'Linux' From 08e7dd44defb05d58cd7838f4b404755c410bb3d Mon Sep 17 00:00:00 2001 From: Eran Kampf Date: Sat, 20 Dec 2025 20:09:06 -0800 Subject: [PATCH 6/7] try --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index 88b1831..02169b5 100644 --- a/action.yml +++ b/action.yml @@ -33,6 +33,7 @@ runs: VERSION=$(curl -s https://packages.twingate.com/apt/Packages | awk '/^Version:/ {print $2}' | sort -V | tail -1) echo "version=$VERSION" >> $GITHUB_OUTPUT echo "Latest Twingate version: $VERSION" + echo "deb [trusted=yes] https://packages.twingate.com/apt/ /" | sudo tee /etc/apt/sources.list.d/twingate.list - uses: awalsh128/cache-apt-pkgs-action@v1.6.0 with: From 68fc12d181e9d465d3295a5602947774f1578621 Mon Sep 17 00:00:00 2001 From: Eran Kampf Date: Sat, 20 Dec 2025 20:18:43 -0800 Subject: [PATCH 7/7] try --- action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/action.yml b/action.yml index 02169b5..02ce80b 100644 --- a/action.yml +++ b/action.yml @@ -38,7 +38,6 @@ runs: - uses: awalsh128/cache-apt-pkgs-action@v1.6.0 with: packages: twingate - add-repository: https://packages.twingate.com/apt/ version: ${{ steps.twingate-version.outputs.version }} debug: true