-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from peter-evans/token-updates
Set a token default and support private repos
- Loading branch information
Showing
5 changed files
with
53 additions
and
68 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ This is especially useful when installing arbitrary Go binaries. It can lookup t | |
|
||
## Usage | ||
|
||
This action requires a Github Token (`GITHUB_TOKEN`) in the environment to authenticate with. | ||
|
||
### Grab the Latest Version | ||
|
||
```yaml | ||
|
@@ -17,43 +15,43 @@ steps: | |
uses: jaxxstorm/[email protected] | ||
with: # Grab the latest version | ||
repo: go-task/task | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Github token scoped to step | ||
``` | ||
### Grab a Specific Tags | ||
```yaml | ||
# ... | ||
jobs: | ||
my_job: | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Github token scoped to job | ||
steps: | ||
- name: Install tf2pulumi | ||
uses: jaxxstorm/[email protected] | ||
with: # Grab a specific tag | ||
repo: pulumi/tf2pulumi | ||
tag: v0.7.0 | ||
steps: | ||
- name: Install tf2pulumi | ||
uses: jaxxstorm/[email protected] | ||
with: # Grab a specific tag | ||
repo: pulumi/tf2pulumi | ||
tag: v0.7.0 | ||
``` | ||
### Grab a Specific Platform And/Or Architecture | ||
```yaml | ||
name: my_action | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Github token scoped to action | ||
|
||
jobs: | ||
my_job: | ||
steps: | ||
- name: Install tfsec | ||
uses: jaxxstorm/[email protected] | ||
with: # Grab a specific platform and/or architecture | ||
repo: aquasecurity/tfsec | ||
platform: linux | ||
arch: x86-64 | ||
steps: | ||
- name: Install tfsec | ||
uses: jaxxstorm/[email protected] | ||
with: # Grab a specific platform and/or architecture | ||
repo: aquasecurity/tfsec | ||
platform: linux | ||
arch: x86-64 | ||
``` | ||
### Grab from a private repository | ||
Use a `repo` scoped [Personal Access Token (PAT)](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) that has been created on a user with access to the private repository. | ||
|
||
```yaml | ||
steps: | ||
- name: Install private tool | ||
uses: jaxxstorm/[email protected] | ||
with: # Grab from a private repository | ||
token: ${{ secrets.MY_PAT }} | ||
repo: my-org/my-private-repo | ||
``` | ||
|
||
### Caching | ||
|
@@ -62,17 +60,13 @@ This action can use [actions/cache](https://github.com/actions/cache) under the | |
|
||
```yaml | ||
# ... | ||
jobs: | ||
my_job: | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Github token scoped to job | ||
steps: | ||
- name: Install tf2pulumi | ||
uses: jaxxstorm/[email protected] | ||
with: # Grab a specific tag with caching | ||
repo: pulumi/tf2pulumi | ||
tag: v0.7.0 | ||
cache: enable | ||
steps: | ||
- name: Install tf2pulumi | ||
uses: jaxxstorm/[email protected] | ||
with: # Grab a specific tag with caching | ||
repo: pulumi/tf2pulumi | ||
tag: v0.7.0 | ||
cache: enable | ||
``` | ||
|
||
Caching helps avoid | ||
|
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