Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@ We recommend using a Linux or MacOS runner if possible, especially if TinyTeX is
tinytex: true
```

### GitHub Enterprise

For GitHub Enterprise Server (GHES), you may need to [generate a personal access token (PAT) on github.com](https://github.com/settings/tokens/new) to enable downloading Quarto. GitHub's [setup-python action](https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#avoiding-rate-limit-issues) uses a similar workaround, from which these instructions are adapted:

- Create a PAT on any github.com account by using [this link](https://github.com/settings/tokens/new) after logging into github.com (not your GHES instance). This PAT does not need any rights, so make sure all the boxes are unchecked.
- Store this PAT in the repository / organization where you run your workflow, e.g. as `GH_GITHUB_COM_TOKEN`. You can do this by navigating to your repository -> **Settings** -> **Secrets** -> **Actions** -> **New repository secret**.
- In your workflow, incorporate your PAT as an environment variable. For example:

```yaml
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
env:
GH_TOKEN: ${{ secrets.GH_GITHUB_COM_TOKEN }}
```

## Examples

```yaml
Expand Down
2 changes: 1 addition & 1 deletion setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ runs:
# On Windows scoop will be used so no need to download the release
if [ -z "${{inputs.version}}" ]; then
# download the latest stable release
gh release download --repo quarto-dev/quarto-cli --pattern ${{ format('*{0}', env.BUNDLE_EXT) }}
gh release download --repo github.com/quarto-dev/quarto-cli --pattern ${{ format('*{0}', env.BUNDLE_EXT) }}
version=$(curl https://quarto.org/docs/download/_download.json | jq -r '.version')
echo "version=${version}" >> $GITHUB_OUTPUT
elif [ "${{inputs.version}}" == "LATEST" -o "${{inputs.version}}" == "pre-release" ]; then
Expand Down