-
-
Notifications
You must be signed in to change notification settings - Fork 617
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use templating system instead of os.ExpandEnv
- Loading branch information
Showing
5 changed files
with
13 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
testdata/includes_interpolation/include_with_env_variable/Taskfile.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
version: "3" | ||
|
||
includes: | ||
include-with-env-variable: '../{{.MODULE}}/Taskfile.yml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,13 +48,13 @@ tasks: | |
and you run `task my-remote-namespace:hello`, it will print the text: "Hello | ||
from the remote Taskfile!" to your console. | ||
|
||
You can also reference environment variable in your URL to have authentication, for example : | ||
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 | ||
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://[email protected]/my-org/my-repo/main/Taskfile.yml` | ||
|