mirror of
https://github.com/go-task/task.git
synced 2026-06-28 15:14:18 +00:00
feat(remote): replace env variable in include remote URL (#1610)
* feat(remote): replace env variable in include remote URL * use templating system instead of os.ExpandEnv * lint
This commit is contained in:
@@ -48,6 +48,17 @@ tasks:
|
||||
and you run `task my-remote-namespace:hello`, it will print the text: "Hello
|
||||
from the remote Taskfile!" to your console.
|
||||
|
||||
URL is processed by the templating system, so you can reference environment variable in your URL to have authentication, for example :
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
includes:
|
||||
my-remote-namespace: https://{{.TOKEN}}@raw.githubusercontent.com/my-org/my-repo/main/Taskfile.yml
|
||||
```
|
||||
|
||||
`TOKEN=my-token task my-remote-namespace:hello` will be resolved by Task to `https://my-token@raw.githubusercontent.com/my-org/my-repo/main/Taskfile.yml`
|
||||
|
||||
## Security
|
||||
|
||||
Running commands from sources that you do not control is always a potential
|
||||
|
||||
Reference in New Issue
Block a user