Skip to content

Commit 642db39

Browse files
authoredFeb 28, 2020
Add Examples section to README.md (superbrothers#15)
1 parent 7a62475 commit 642db39

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
 

‎README.md

+19
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,25 @@ Commands:
8787

8888
```
8989
90+
## Examples
91+
92+
### Use downloaded commands in subsequent steps
93+
94+
```yaml
95+
steps:
96+
- uses: superbrothers/setup-ga@v1
97+
env:
98+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99+
- name: Setup kubectl
100+
run: |
101+
set -x
102+
toolPath="$(mktemp -d)"
103+
curl -o "${toolPath}/kubectl" -L -s https://storage.googleapis.com/kubernetes-release/release/v1.17.0/bin/linux/amd64/kubectl
104+
chmod +x "${toolPath}/kubectl"
105+
ga add-path "$toolPath"
106+
- run: kubectl version --client
107+
```
108+
90109
## References
91110
92111
- [Development tools for GitHub Actions \- GitHub Help](https://help.github.com/en/actions/reference/development-tools-for-github-actions)

‎hack/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,25 @@ All available ga subcommands are as follow:
5656
__HELP__
5757
```
5858

59+
## Examples
60+
61+
### Use downloaded commands in subsequent steps
62+
63+
```yaml
64+
steps:
65+
- uses: superbrothers/setup-ga@v1
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
- name: Setup kubectl
69+
run: |
70+
set -x
71+
toolPath="$(mktemp -d)"
72+
curl -o "${toolPath}/kubectl" -L -s https://storage.googleapis.com/kubernetes-release/release/v1.17.0/bin/linux/amd64/kubectl
73+
chmod +x "${toolPath}/kubectl"
74+
ga add-path "$toolPath"
75+
- run: kubectl version --client
76+
```
77+
5978
## References
6079
6180
- [Development tools for GitHub Actions \- GitHub Help](https://help.github.com/en/actions/reference/development-tools-for-github-actions)

0 commit comments

Comments
 (0)
Please sign in to comment.