diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1c770296..eac1ca90 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/.github/workflows/test_hooks.yml b/.github/workflows/test_hooks.yml index 6fe9ffbb..f1b13033 100644 --- a/.github/workflows/test_hooks.yml +++ b/.github/workflows/test_hooks.yml @@ -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 diff --git a/README.md b/README.md index 87114e2a..66c162de 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,6 @@ jobs: - name: actions-template-sync uses: AndreasAugustin/actions-template-sync@v1 with: - github_token: ${{ secrets.GITHUB_TOKEN }} source_repo_path: upstream_branch: # defaults to main pr_labels: ,[,...] # defaults to template_sync @@ -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` | `` | +| 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` | diff --git a/action.yml b/action.yml index 9479443c..8fc113e0 100644 --- a/action.yml +++ b/action.yml @@ -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