From fe553a9a158f85c1f3664f9d8b9410dce929ef18 Mon Sep 17 00:00:00 2001 From: jkpe <16779171+jkpe@users.noreply.github.com> Date: Thu, 2 Nov 2023 11:55:24 +0000 Subject: [PATCH 1/3] Add Tailscale version and dependency update instructions to README.md --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/README.md b/README.md index 61a0a40..dcce6eb 100644 --- a/README.md +++ b/README.md @@ -26,3 +26,43 @@ Nodes created by this Action are [marked as Ephemeral](https://tailscale.com/s/e be automatically removed by the coordination server a short time after they finish their run. The nodes are also [marked Preapproved](https://tailscale.com/kb/1085/auth-keys/) on tailnets which use [Device Approval](https://tailscale.com/kb/1099/device-approval/) + +## Defining Tailscale version + +Which Tailscale version to use can be set like this: + +```yaml + - name: Tailscale + uses: tailscale/github-action@v2 + with: + oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }} + oauth-secret: ${{ secrets.TS_OAUTH_SECRET }} + tags: tag:ci + version: 1.52.0 +``` + +### Updating Tailscale as a dependancy + +#### Renovate + +If you already use [Renovate](https://docs.renovatebot.com/) to keep dependancies up to date you can use the [regex manager](https://docs.renovatebot.com/modules/manager/regex/) to keep the version of Tailscale used in your GitHub Action up to date by defining it as a dependency. + +Here is an example of `renovate.json` that will look for the version string and compare it against the latest [tailscale/tailscale](https://github.com/tailscale/tailscale) GitHub Release. + +```json +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ], + "customManagers": [ + { + "customType": "regex", + "fileMatch": ["^(workflow-templates|\.(?:github|gitea|forgejo)/workflows)/[^/]+\.ya?ml$"], + "matchStrings": ["uses: tailscale\\/github-action@v2(?:\\s+.*\\n)*?.*version: (?.*?)\\n"], + "depNameTemplate": "tailscale/tailscale", + "datasourceTemplate": "github-releases" + } + ] +} +``` \ No newline at end of file From 674b2b361c6f5e2b78d1590cadbe71d83c7cb136 Mon Sep 17 00:00:00 2001 From: jkpe <16779171+jkpe@users.noreply.github.com> Date: Thu, 2 Nov 2023 12:34:15 +0000 Subject: [PATCH 2/3] Add version extraction to renovate.json --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dcce6eb..2096db9 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,8 @@ Here is an example of `renovate.json` that will look for the version string and "fileMatch": ["^(workflow-templates|\.(?:github|gitea|forgejo)/workflows)/[^/]+\.ya?ml$"], "matchStrings": ["uses: tailscale\\/github-action@v2(?:\\s+.*\\n)*?.*version: (?.*?)\\n"], "depNameTemplate": "tailscale/tailscale", - "datasourceTemplate": "github-releases" + "datasourceTemplate": "github-releases", + "extractVersionTemplate": "v(?.*)" } ] } From 480ad42362ca9d24319de100c9ad2b45626ab82f Mon Sep 17 00:00:00 2001 From: jkpe <16779171+jkpe@users.noreply.github.com> Date: Thu, 2 Nov 2023 12:51:40 +0000 Subject: [PATCH 3/3] Remove renovate instructions --- README.md | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/README.md b/README.md index 2096db9..f66344d 100644 --- a/README.md +++ b/README.md @@ -40,30 +40,3 @@ Which Tailscale version to use can be set like this: tags: tag:ci version: 1.52.0 ``` - -### Updating Tailscale as a dependancy - -#### Renovate - -If you already use [Renovate](https://docs.renovatebot.com/) to keep dependancies up to date you can use the [regex manager](https://docs.renovatebot.com/modules/manager/regex/) to keep the version of Tailscale used in your GitHub Action up to date by defining it as a dependency. - -Here is an example of `renovate.json` that will look for the version string and compare it against the latest [tailscale/tailscale](https://github.com/tailscale/tailscale) GitHub Release. - -```json -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:recommended" - ], - "customManagers": [ - { - "customType": "regex", - "fileMatch": ["^(workflow-templates|\.(?:github|gitea|forgejo)/workflows)/[^/]+\.ya?ml$"], - "matchStrings": ["uses: tailscale\\/github-action@v2(?:\\s+.*\\n)*?.*version: (?.*?)\\n"], - "depNameTemplate": "tailscale/tailscale", - "datasourceTemplate": "github-releases", - "extractVersionTemplate": "v(?.*)" - } - ] -} -``` \ No newline at end of file