Skip to content

Commit

Permalink
feat: ✨ Set token to the default provided by GitHub workflow (#483)
Browse files Browse the repository at this point in the history
* Set token to the default provided by GitHub workflow

* chore: 🧑‍💻 update tests

---------

Co-authored-by: andy Augustin <[email protected]>
Co-authored-by: Andy Augustin <[email protected]>
  • Loading branch information
3 people authored Mar 5, 2024
1 parent 07cfe64 commit c1e7561
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
id: test
uses: ./ # Uses an action in the root directory
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_repo_path: AndreasAugustin/template.git
is_dry_run: true
- name: print output
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test_hooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
env:
MY_VAR: "bar"
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_repo_path: AndreasAugustin/template.git
upstream_branch: main
is_dry_run: true
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ jobs:
- name: actions-template-sync
uses: AndreasAugustin/actions-template-sync@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_repo_path: <owner/repo>
upstream_branch: <target_branch> # defaults to main
pr_labels: <label1>,<label2>[,...] # defaults to template_sync
Expand Down Expand Up @@ -232,11 +231,11 @@ jobs:

### Action Inputs

| Variable | Description | Required | `[Default]` |
| Variable | Description | Required | Default |
|-----------------------------|---------------------------------------------------------------------------------------------------------------|----------|-----------------------------------------------------------------------|
| github_token | Token for the repo. Can be passed in using `$\{{ secrets.GITHUB_TOKEN }}` | `true` | |
| github_token | Token for the repo. Can be passed in using `${{ secrets.GITHUB_TOKEN }}` | `true` | `${{ github.token }}` |
| source_repo_path | Repository path of the template | `true` | |
| upstream_branch | The target branch | `false` | `<The_remote_default>` |
| upstream_branch | The target branch | `false` | The remote's default (usually `main`) |
| source_repo_ssh_private_key | `[optional]` private ssh key for the source repository. [see](#private-template-repository) | `false` | |
| pr_branch_name_prefix | `[optional]` the prefix of branches created by this action | `false` | `chore/template_sync` |
| pr_title | `[optional]` the title of PRs opened by this action. Must be already created. | `false` | `upstream merge template repository` |
Expand Down
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ inputs:
github_token:
description: 'Token for the repo. Can be passed in using $\{{ secrets.GITHUB_TOKEN }}'
required: true
default: ${{ github.token }}
source_repo_path:
description: "Repository path of the template"
required: true
Expand Down

0 comments on commit c1e7561

Please sign in to comment.